From b5cfd7fb309a777c24317cddd1ad43242b61baf3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 10 Dec 2012 11:50:07 -0500 Subject: [PATCH] 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. --- src/libply-splash-core/ply-text-progress-bar.c | 2 ++ 1 file changed, 2 insertions(+) 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] == '\''))