Package: lv2core
Version: 4.0-5
Severity: normal
Tags: patch

This is a bug against the SOURCE package from Debian Sid so my distribution 
is irrelevant.

When building lv2core-4.0-5 from sid, I noticed a warning about snprintf 
being guaranteed to overflow in write_text. The problem seems to be that the 
local variable `escape' is declared as char [10], then used in snprintf as 
if it had 11 characters.

Attached patch trivially fixes that.

-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 
'lucid-proposed'), (500, 'lucid-backports'), (500, 'lucid')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-11-rt (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- a/serd-0.1.0.c
+++ b/serd-0.1.0.c
@@ -2313,7 +2313,7 @@
 write_text(SerdWriter writer, TextContext ctx,
            const uint8_t* utf8, size_t n_bytes, uint8_t terminator)
 {
-	char escape[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	char escape[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 	for (size_t i = 0; i < n_bytes;) {
 		uint8_t in = utf8[i++];
 		switch (in) {
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to