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
pgpYxXZHOQDdz.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
