[vlc-commits] xdg: fix infinite loop if the file is invalid
Rémi Duraffort
git at videolan.org
Thu Jan 2 09:27:51 CET 2014
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Dec 31 18:38:38 2013 +0100| [b1d4cd1999dc7739e062406d90d2db6b2cdb394e] | committer: Rémi Duraffort
xdg: fix infinite loop if the file is invalid
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1d4cd1999dc7739e062406d90d2db6b2cdb394e
---
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