From: Ray Strode Date: Mon, 10 Dec 2012 16:50:07 +0000 (-0500) Subject: text-progress-bar: fix os string parsing X-Git-Tag: 0.9.0~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5cfd7fb309a777c24317cddd1ad43242b61baf3;p=thirdparty%2Fplymouth.git text-progress-bar: fix os string parsing If there's no newline the the end of string variable will be NULL instead of at the end of string. --- diff --git a/src/libply-splash-core/ply-text-progress-bar.c b/src/libply-splash-core/ply-text-progress-bar.c index ea92d49f..8c4e7592 100644 --- a/src/libply-splash-core/ply-text-progress-bar.c +++ b/src/libply-splash-core/ply-text-progress-bar.c @@ -136,6 +136,8 @@ get_os_string (void) if (pos2 != NULL) *pos2 = '\0'; + else + pos2 = pos + strlen(pos) - 1; if ((*pos == '\"' && pos2[-1] == '\"') || (*pos == '\'' && pos2[-1] == '\''))