From: "Daniel P. Berrange" <dan@berrange.com>

The _get_path method in the directory driver does not check
the return value of _get_mountpoint causing it to use
potentially uninitialized data.



git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14894 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-04-11 20:00:57 +00:00
parent 237f12e073
commit 4a6a23f63e

View File

@@ -227,6 +227,8 @@ _get_path (GPPort *port, const char *folder, const char *file, char *path, unsig
char *xpath;
ret = _get_mountpoint (port, &xpath);
if (ret < GP_OK)
return ret;
snprintf (path, size, "%s/%s/%s", xpath, folder, file);
} else {
/* old style access */