[syslinux] [PATCH 1/2] msg: VGAFilePtr should be char
Patrick Masotta
masottaus at yahoo.com
Fri Aug 21 12:33:54 PDT 2015
>>>>
VGAFilePtr is used as a pointer into VGAFileBuf, so it should be the same type.
Signed-off-by: Chas Williams <ciwillia at brocade.com>
---
....
<<<<
I think probably this patch is buggy:
You have redefined VGAFilePtr
-__export uint16_t *VGAFilePtr; /* Pointer into VGAFileBuf */
+__export char *VGAFilePtr; /* Pointer into VGAFileBuf */
but you did not redefine i.e.
*VGAFilePtr++ = data;
Incrementing a pointer to "uint16_t" implies moving the pointer forward 2 bytes
while incrementing a pointer to "char" moves the pointer forward only 1 byte.
Then the next pointer de-referencing would point to the wrong location
Was this code working when you tested it?
Best,
Patrick
More information about the Syslinux
mailing list