[riot-commits] [RIOT-OS/RIOT] f41fe7: destiny: segfault due to dereferencing nullpointer

Oleg Hahm oleg at hobbykeller.org
Wed Jun 4 00:51:42 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: f41fe7bb0447dfbf16d3b6df124d3b04c657ac9b
      https://github.com/RIOT-OS/RIOT/commit/f41fe7bb0447dfbf16d3b6df124d3b04c657ac9b
  Author: Cenk Gündoğan <cnkgndgn at gmail.com>
  Date:   2014-06-03 (Tue, 03 Jun 2014)

  Changed paths:
    M sys/net/transport_layer/destiny/socket.c

  Log Message:
  -----------
  destiny: segfault due to dereferencing nullpointer
get_socket(i) returns NULL, when no specific socket is found.
Without an appropriate check for NULL, the current state
of the code leads to a segfault.

destiny: added parens

destiny: continuing the loop makes more sense than returning at first sight of NULL


  Commit: 47e5c9055c8e97837fd0f2065f21f92908389fe3
      https://github.com/RIOT-OS/RIOT/commit/47e5c9055c8e97837fd0f2065f21f92908389fe3
  Author: Oleg Hahm <oleg at hobbykeller.org>
  Date:   2014-06-04 (Wed, 04 Jun 2014)

  Changed paths:
    M sys/net/transport_layer/destiny/socket.c

  Log Message:
  -----------
  Merge pull request #1269 from cgundogan/fix_get_waiting_connection_socket_null_check

destiny: segfault due to dereferencing nullpointer


Compare: https://github.com/RIOT-OS/RIOT/compare/aab231120588...47e5c9055c8e


More information about the commits mailing list