<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libubox/base64.c, branch master</title>
<subtitle>C utility functions for OpenWrt</subtitle>
<id>https://git-03.infra.openwrt.org/project/libubox/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/libubox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/'/>
<updated>2019-11-24T12:26:58Z</updated>
<entry>
<title>base64: fix possible null pointer dereference</title>
<updated>2019-11-24T12:26:58Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-19T16:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=0003ea9c45cc8d2f57af760a92a35f371649714f'/>
<id>urn:sha1:0003ea9c45cc8d2f57af760a92a35f371649714f</id>
<content type='text'>
clang-10 analyzer reports following:

 base64.c:325:20: warning: Array access (from variable 'target') results in a null pointer dereference
                 target[tarindex] = 0;
                 ~~~~~~           ^

and prepared test case confirms it:

 Invalid write of size 1
    at 0x4E4463F: b64_decode (base64.c:325)
    by 0x40088C: test_invalid_inputs (tests/test-base64.c:26)
    by 0x40088C: main (tests/test-base64.c:32)
  Address 0x1 is not stack'd, malloc'd or (recently) free'd

 Process terminating with default action of signal 11 (SIGSEGV)
  Access not within mapped region at address 0x1
    at 0x4E4463F: b64_decode (base64.c:325)
    by 0x40088C: test_invalid_inputs (tests/test-base64.c:26)
    by 0x40088C: main (tests/test-base64.c:32)

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>iron out all extra compiler warnings</title>
<updated>2019-11-20T13:34:01Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-06-10T06:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=6228df9de91d4047ca89f7db670788f3d9b51170'/>
<id>urn:sha1:6228df9de91d4047ca89f7db670788f3d9b51170</id>
<content type='text'>
gcc-9 on x86/64 has reported following issues:

 base64.c:173:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:230:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:238:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:242:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:252:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:256:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:266:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:315:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 base64.c:329:15: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 blob.c:207:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.c:210:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.c:243:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare]
 blob.c:246:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare]
 blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blob.h:253:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 blobmsg_json.c:155:10: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 examples/../blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 examples/../blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
 json_script.c:590:7: error: this statement may fall through [-Werror=implicit-fallthrough=]

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>b64_encode(): fixed input[] not initialized warn under gcc 4.4.5</title>
<updated>2015-09-09T09:03:07Z</updated>
<author>
<name>Bachtin, Dmitri</name>
</author>
<published>2015-09-09T07:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=d66a89f010247f20a9803f2bef1c3dc1d7d706b9'/>
<id>urn:sha1:d66a89f010247f20a9803f2bef1c3dc1d7d706b9</id>
<content type='text'>
Signed-off-by: Dmitri Bachtin &lt;dbachtin@init-ka.de&gt;
</content>
</entry>
<entry>
<title>add a base64 implementation (based on FreeBSD code)</title>
<updated>2015-05-08T12:34:29Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2015-05-08T12:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=a8e70c6d361967a23977417fb7d6cf56234f8b81'/>
<id>urn:sha1:a8e70c6d361967a23977417fb7d6cf56234f8b81</id>
<content type='text'>
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
</content>
</entry>
</feed>
