[Spice-devel] kde/spice crashes when firefox is started

Christophe Fergeau cfergeau at redhat.com
Thu May 30 03:09:27 PDT 2013


On Thu, May 30, 2013 at 10:15:16AM +0200, Rob Verduijn wrote:
> And one additional patch from myself because rpmlint refuses to build
> unless that one is applied (9000-fix-strncat-bufferoverflow.patch)

What errors were you getting? I'd go with something like:
diff --git a/src/spiceqxl_audio.c b/src/spiceqxl_audio.c
index 3cd80ff..2e39387 100644
--- a/src/spiceqxl_audio.c
+++ b/src/spiceqxl_audio.c
@@ -167,9 +167,10 @@ scan_fifos (struct audio_data *data, const char
*dirname)
             return 0;
         }

-        strncpy(path, dirname, sizeof(path));
-        strncat(path, "/", sizeof(path));
-        strncat(path, ent->d_name, sizeof(path));
+        strncpy(path, dirname, sizeof(path) - 1);
+        path[sizeof(path) - 1] = '\0'
+        strncat(path, "/", sizeof(path) - 1);
+        strncat(path, ent->d_name, sizeof(path) - 1);

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130530/eb36e7e9/attachment.pgp>


More information about the Spice-devel mailing list