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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user