Re: [PATCH] Two trivial fixes for Control Flow Integrity support
Nick Wellnhofer <[email protected]>
| Newsgroups | gmane.comp.gnome.lib.xml.general |
|---|---|
| Message-ID | <[email protected]> |
On 08/11/2017 19:48, Vlad Tsyrklevich via xml wrote: > The patches fix type signature mismatches with xmlNop() and > xmlMemStrdup(). The first patch sets xmlNop() to have the same type > signature as xmlInputReadCallback, which is the only type it's ever > cast to. Can you rename xmlNop to something like xmlInputNopReadCallback and remove the now unnecessary casts when it is used? Also annotate the unused parameters with ATTRIBUTE_UNUSED. > Under some compiler flags, xmlMemStrdup() is a function > pointer pointing to xmlStrdup() despite a mismatched type signature. > In that case I set it to strdup() instead since it has the correct > type signature and the other xmlMem(Malloc|Realloc|Free) function > pointers around it point directly to the libc implementations as well. strdup is a POSIX extension and can't be used for platform compatibility reasons. You'll probably have to write a wrapper around xmlStrdup. If possible, please format patches with git-format-patch. Nick