[Tile-serving] [openstreetmap/mod_tile] iniparser PVS-Studio warnings (#135)

Darafei Praliaskouski notifications at github.com
Tue Sep 13 11:01:25 UTC 2016


PVS-Studio static analyzer fund problems in iniparser - please review! :)
```
Viva64-EM<#~>full<#~>1<#~> <#~>error<#~>Renew<#~>Your license will expire in 7 days. Click 'Renew' to learn more or contact us at support at viva64.com.<#~>false<#~>1<#~><#~><#~><#~>
Viva64-EM<#~>full<#~>1<#~> <#~>error<#~>Renew<#~>Your license will expire in 7 days. Click 'Renew' to learn more or contact us at support at viva64.com.<#~>false<#~>1<#~><#~><#~><#~>
Viva64-EM<#~>full<#~>557<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'line'.<#~>false<#~>1<#~><#~>    memset(line,    0, ASCIILINESZ);<#~>    memset(section, 0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>558<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'section'.<#~>false<#~>1<#~>    memset(line,    0, ASCIILINESZ);<#~>    memset(section, 0, ASCIILINESZ);<#~>    memset(key,     0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>559<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'key'.<#~>false<#~>1<#~>    memset(section, 0, ASCIILINESZ);<#~>    memset(key,     0, ASCIILINESZ);<#~>    memset(val,     0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>560<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'val'.<#~>false<#~>1<#~>    memset(key,     0, ASCIILINESZ);<#~>    memset(val,     0, ASCIILINESZ);<#~>    last=0 ;<#~>
Viva64-EM<#~>full<#~>567<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V557<#~>Array underrun is possible. The value of 'len' index could reach -1.<#~>false<#~>2<#~>        /* Safety check against buffer overflows */<#~>        if (line[len]!='\n') {<#~>            fprintf(stderr,<#~>
Viva64-EM<#~>full<#~>600<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'sprintf' function will lead to overflow of the buffer 'tmp'.<#~>false<#~>2<#~>            case LINE_VALUE:<#~>            sprintf(tmp, "%s:%s", section, key);<#~>            errs = dictionary_set(dict, tmp, val) ;<#~>
Viva64-EM<#~>full<#~>615<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'line'.<#~>false<#~>1<#~>        }<#~>        memset(line, 0, ASCIILINESZ);<#~>        last=0;<#~>
Viva64-EM<#~>full<#~>1<#~> <#~>error<#~>Renew<#~>Your license will expire in 7 days. Click 'Renew' to learn more or contact us at support at viva64.com.<#~>false<#~>1<#~><#~><#~><#~>
Viva64-EM<#~>full<#~>557<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'line'.<#~>false<#~>1<#~><#~>    memset(line,    0, ASCIILINESZ);<#~>    memset(section, 0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>558<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'section'.<#~>false<#~>1<#~>    memset(line,    0, ASCIILINESZ);<#~>    memset(section, 0, ASCIILINESZ);<#~>    memset(key,     0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>559<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'key'.<#~>false<#~>1<#~>    memset(section, 0, ASCIILINESZ);<#~>    memset(key,     0, ASCIILINESZ);<#~>    memset(val,     0, ASCIILINESZ);<#~>
Viva64-EM<#~>full<#~>560<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'val'.<#~>false<#~>1<#~>    memset(key,     0, ASCIILINESZ);<#~>    memset(val,     0, ASCIILINESZ);<#~>    last=0 ;<#~>
Viva64-EM<#~>full<#~>567<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V557<#~>Array underrun is possible. The value of 'len' index could reach -1.<#~>false<#~>2<#~>        /* Safety check against buffer overflows */<#~>        if (line[len]!='\n') {<#~>            fprintf(stderr,<#~>
Viva64-EM<#~>full<#~>600<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'sprintf' function will lead to overflow of the buffer 'tmp'.<#~>false<#~>2<#~>            case LINE_VALUE:<#~>            sprintf(tmp, "%s:%s", section, key);<#~>            errs = dictionary_set(dict, tmp, val) ;<#~>
Viva64-EM<#~>full<#~>615<#~>/home/kom/proj/mod_tile/iniparser3.0b/src/iniparser.c<#~>error<#~>V512<#~>A call of the 'memset' function will lead to underflow of the buffer 'line'.<#~>false<#~>1<#~>        }<#~>        memset(line, 0, ASCIILINESZ);<#~>        last=0;<#~>
Viva64-EM<#~>full<#~>1<#~> <#~>error<#~>Renew<#~>Your license will expire in 7 days. Click 'Renew' to learn more or contact us at support at viva64.com.<#~>false<#~>1<#~><#~><#~><#~>
(END)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/135
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20160913/b1f36d82/attachment.html>


More information about the Tile-serving mailing list