Commit 9f8dd8c
committed
Fix XMPUtils::ConvertToInt64 sscanf() type
This function uses sscanf() with "%lld" or "%llx" to
parse a string to an integer. However, nothing guarantees
that sizeof(XMP_Int64) == sizeof(long long); the latter
is what sscanf will fill with either of these format strings,
to avoid memory corruption.
Use a long long to match the sscanf size, and let the return statement
cast it to XMP_Int64.1 parent 6156349 commit 9f8dd8c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | | - | |
| 1218 | + | |
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
| |||
0 commit comments