tags 551075 + patch pending thanks Hi,
I've made an NMU of sed 4.2.1-3.1 to the DELAYED/2 queue using the attached patch, extracted from upstream. -- Matt http://ftbfs.org/kraai
diff -u sed-4.2.1/debian/changelog sed-4.2.1/debian/changelog --- sed-4.2.1/debian/changelog +++ sed-4.2.1/debian/changelog @@ -1,3 +1,11 @@ +sed (4.2.1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Handle incomplete sequences as if they were invalid. + closes: #551075. + + -- Matt Kraai <kr...@debian.org> Mon, 26 Oct 2009 20:36:53 -0700 + sed (4.2.1-3) unstable; urgency=medium * Make dependencies Pre-Depends again. closes: #539580. only in patch2: unchanged: --- sed-4.2.1.orig/sed/execute.c +++ sed-4.2.1/sed/execute.c @@ -254,8 +254,8 @@ { size_t n = MBRLEN (string, length, &to->mbstate); - /* An invalid sequence is treated like a singlebyte character. */ - if (n == (size_t) -1) + /* An invalid or imcomplete sequence is treated like a singlebyte character. */ + if (n == (size_t) -1 || n == (size_t) -2) { memset (&to->mbstate, 0, sizeof (to->mbstate)); n = 1; @@ -341,7 +341,7 @@ /* Copy the new wide character to the end of the string. */ n = WCRTOMB (to->active + to->length, wc, &to->mbstate); to->length += n; - if (n == -1) + if (n == -1 || n == -2) { fprintf (stderr, "Case conversion produced an invalid character!"); abort ();