aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_browser_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-04-06 23:46:09 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-04-06 23:46:09 +0000
commitbaa239c4870ba2236aeb8c54b892dd25d43d780a (patch)
tree17e1e5b2c97e57cfd012e9b14109916cd419d17b /src/http/modules/ngx_http_browser_module.c
parentbd6d421816f6e317eec512620a51aa0521288405 (diff)
downloadnginx-baa239c4870ba2236aeb8c54b892dd25d43d780a.tar.gz
nginx-baa239c4870ba2236aeb8c54b892dd25d43d780a.zip
Fixed signed integer overflows in timer code (ticket #145).
Integer overflow is undefined behaviour in C and this indeed caused problems on Solaris/SPARC (at least in some cases). Fix is to subtract unsigned integers instead, and then cast result to a signed one, which is implementation-defined behaviour and used to work. Strictly speaking, we should compare (unsigned) result with the maximum value of the corresponding signed integer type instead, this will be defined behaviour. This will require much more changes though, and considered to be overkill for now.
Diffstat (limited to 'src/http/modules/ngx_http_browser_module.c')
0 files changed, 0 insertions, 0 deletions