fix the overflow/wrap checks in Samba4 for new gcc optimisation behavior
authorAndrew Tridgell <tridge@samba.org>
Thu, 17 Apr 2008 13:20:39 +0000 (15:20 +0200)
committerAndrew Tridgell <tridge@samba.org>
Thu, 17 Apr 2008 13:20:39 +0000 (15:20 +0200)
commit11703b298685c9984a6a3c3a64eddb8a1a516b90
treee747019d16a998f1a61f28762b2aaaab673a0d08
parent107ab090e23dfc517bc74bb553315cd3528e1f7d
fix the overflow/wrap checks in Samba4 for new gcc optimisation behavior

The approach I have used is as set out in
https://www.securecoding.cert.org/confluence/display/seccode/ARR38-C.+Do+not+add+or+subtract+an+integer+to+a+pointer+if+the+resulting+value+does+not+refer+to+an+element+within+the+array
(This used to be commit 92d5fb531db39be655f0cbd2d75b5f675a0a4cfa)
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawtrans.c
source4/libcli/smb2/request.c
source4/smb_server/smb/request.c