[CRIU] [PATCH] x86/crtools: Fix null pointer dereference

Cyrill Gorcunov gorcunov at gmail.com
Thu May 2 11:11:16 MSK 2019


On Thu, May 02, 2019 at 08:47:31AM +0100, Radostin Stoyanov wrote:
> Dereferencing a null pointer is undefined behavior.
> 
> ISO/IEC 9899, clause 6.5.3.2, paragraph 4
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>

You should declare x with always unused attribute then, or similar.
Note though that we never claimed to be strict c99 compliant,
but rather rely on gcc behaviour. That said I don't mind for
such change but please update @x declaration.


More information about the CRIU mailing list