[vlc-commits] xdg: fix infinite loop if the file is invalid
Rémi Duraffort
git at videolan.org
Sun Jan 19 00:49:28 CET 2014
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Dec 31 18:38:38 2013 +0100| [63eb71e07fa91066b13c24f9d57cd7b61d534eba] | committer: Jean-Baptiste Kempf
xdg: fix infinite loop if the file is invalid
(cherry picked from commit b1d4cd1999dc7739e062406d90d2db6b2cdb394e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=63eb71e07fa91066b13c24f9d57cd7b61d534eba
---
src/posix/dirs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/posix/dirs.c b/src/posix/dirs.c
index 10b5ac4..5e43394 100644
--- a/src/posix/dirs.c
+++ b/src/posix/dirs.c
@@ -181,11 +181,12 @@ static char *config_GetTypeDir (const char *xdg_name)
{
free (path);
path = NULL;
- continue;
+ break;
}
*(out++) = *(ptr++);
}
- *out = '\0';
+ if (path != NULL)
+ *out = '\0';
break;
}
free (linebuf);
More information about the vlc-commits
mailing list