Re: kde/spice crashes when firefox is started

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpJMq8WGvUDh.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]