Contiki OS for 6502 based computers
Go to file
Joakim Gebart 24d15ad9a5 core/net/ip: Prevent (tiny) buffer overflow in resolv_found()
An off-by-one error in resolv_found() could make an strncat() call
overflow by the terminating null byte.

When building with Clang the following warning was shown:

../../../core/net/ip/resolv.c:1458:17: warning: the value of the
      size argument in 'strncat' is too large, might lead to a
      buffer overflow [-Wstrncat-size]
                sizeof(resolv_hostname) - strlen(resolv_hostname));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../core/net/ip/resolv.c:1458:17: note: change the argument to
      be the free space in the destination buffer minus the
      terminating null byte
                sizeof(resolv_hostname) - strlen(resolv_hostname));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                sizeof(resolv_hostname) - strlen(resolv_hostname) - 1

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2014-10-02 12:52:39 +02:00
apps Avoid compilation warnings in Antelope. 2014-09-05 18:21:47 +02:00
core core/net/ip: Prevent (tiny) buffer overflow in resolv_found() 2014-10-02 12:52:39 +02:00
cpu Fix time accounting on msp430 Series 5 MCU based platforms (wismote) 2014-08-21 18:09:54 +02:00
dev Fixed CC2420 to return RADIO_RESULT_INVALID_VALUE if trying to set a 2014-04-13 21:43:37 +02:00
doc Make the Protosockets examples possible to compile. 2014-09-05 16:25:25 +02:00
examples Avoid compilation warnings in Antelope. 2014-09-05 18:21:47 +02:00
platform Added missing radio capability define to Z1 platform config 2014-09-24 11:42:55 +02:00
regression-tests Merge pull request #755 from sieben/SkyByteRadio 2014-07-24 09:15:45 +02:00
tools Merge pull request #795 from ejoerns/pull-req/cooja-println-cleanup 2014-10-02 09:25:36 +02:00
.gitignore Add initial EV-ADuCRF101MKxZ platform support 2014-07-22 21:18:16 -04:00
.gitmodules Added the cc2538-bsl submodule to the tools dir 2014-03-07 15:44:29 +01:00
.travis.yml Add modern ARM compiler and ev-aducrf101mkxz to travis tests 2014-07-23 16:21:54 -04:00
CONTRIBUTING.md Adding a CONTRIBUTING file to use github feature 2014-07-04 09:29:12 +02:00
LICENSE
Makefile.include Merge pull request #613 from nfi/distclean 2014-06-11 23:16:36 +02:00
README-BUILDING.md Rename to md 2013-03-26 23:15:37 +01:00
README-EXAMPLES.md Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
README.md Rename to md 2013-03-26 23:15:37 +01:00

The Contiki Operating System

Build Status

Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.

Contiki is used in numerous commercial and non-commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.

For more information, see the Contiki website:

http://contiki-os.org