* g3.c: Read 9+3 bytes, rounded up to the next full 4. instead of just
fixed 12. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6844 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -99,7 +99,7 @@ g3_channel_read_bytes(
|
||||
int rest = expected;
|
||||
if (rest > 65536) rest = 65536;
|
||||
|
||||
ret = gp_port_read(port, xbuf, rest + 12);
|
||||
ret = gp_port_read(port, xbuf, (rest + 9 + 3) & ~3);
|
||||
if (ret < GP_OK) {
|
||||
gp_log(GP_LOG_ERROR, "g3", "read error in g3_channel_read\n");
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user