Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XMPMeta.cpp: fix macro to cast argument to match type
The OutProcHexInt(num) macro fills in its argument via snprintf's "..." varargs part, and the type at the use site depends on the passed-in types. This might cause wrong types on the stack that cause undefined behavior in the snprintf() function, and reading past memory, outputting garbage. Cast the macro argument to (long) to match the %lX format string first, to get the expected type width.
- Loading branch information