diff -u libgksu-2.0.13~pre1/debian/changelog libgksu-2.0.13~pre1/debian/changelog --- libgksu-2.0.13~pre1/debian/changelog +++ libgksu-2.0.13~pre1/debian/changelog @@ -1,3 +1,11 @@ +libgksu (2.0.13~pre1-3ubuntu4~tetet2) natty; urgency=low + + * debian/patches/29_check_newline.patch: + - Check if buffer is really a single newline before + discarding it. (LP: #298217) + + -- Torsten Spindler (Canonical) Tue, 13 Sep 2011 10:55:28 +0200 + libgksu (2.0.13~pre1-3ubuntu3) natty; urgency=low * Resolve unresolved symbols in shared libraries. only in patch2: unchanged: --- libgksu-2.0.13~pre1.orig/debian/patches/29_check_newline.patch +++ libgksu-2.0.13~pre1/debian/patches/29_check_newline.patch @@ -0,0 +1,33 @@ +## Description: Checks if buffer contains only newline before discarding it +## Origin/Author: Torsten Spindler (Canonical) +## Bug: http://pad.lv/298217 +diff -Nur -x '*.orig' -x '*~' libgksu-2.0.13~pre1//libgksu/libgksu.c libgksu-2.0.13~pre1.new//libgksu/libgksu.c +--- libgksu-2.0.13~pre1//libgksu/libgksu.c 2011-09-13 09:43:51.723178003 +0200 ++++ libgksu-2.0.13~pre1.new//libgksu/libgksu.c 2011-09-13 09:46:16.603182354 +0200 +@@ -2980,16 +2980,22 @@ + /* ignore the first newline that comes right after sudo receives + the password */ + fgets (buffer, 255, fdfile); +- /* this is the status we are interested in */ +- fgets (buffer, 255, fdfile); ++ if (!strcmp (buffer, "\n")) ++ { ++ /* this is the status we are interested in */ ++ fgets (buffer, 255, fdfile); ++ } + #else + fcntl(parent_pipe[0], F_SETFL, fcntl(parent_pipe[0], F_GETFL) & ~O_NONBLOCK); + + /* ignore the first newline that comes right after sudo receives + the password */ + fgets (buffer, 255, infile); +- /* this is the status we are interested in */ +- fgets (buffer, 255, infile); ++ if (!strcmp (buffer, "\n")) ++ { ++ /* this is the status we are interested in */ ++ fgets (buffer, 255, infile); ++ } + #endif + } + else