[m-dev.] Possible NULL pointer dereference in Mercury ODBC library

Keri Harris keri at gentoo.org
Wed Sep 27 01:46:25 AEST 2017


When compiling the Mercury ODBC library (extras/odbc) I get the 
following warning:

odbc.m: In function 'odbc_do_cleanup_statement':
odbc.m:1695:14: warning: the comparison will always evaluate as 'true' 
for the address of 'stat' will never be NULL [-Waddress]
      if (stat != NULL) {
This looks like it's due to a typo (stat vs statement) and could 
possibly lead to a NULL pointer dereference. The attached patch 
addresses this.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mercury-extras-odbc.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20170926/1d0214ff/attachment.bin>

More information about the developers mailing list