Check return value of udev_device_get_sysattr_value(); before using atoi();
authorShinwoo Kim <cinoo.kim@samsung.com>
Sat, 29 Nov 2014 06:53:24 +0000 (15:53 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 29 Nov 2014 06:53:24 +0000 (15:53 +0900)
commita15ec56e4f947e098b7d841d8bc98c66717b4134
treea504a075c1b7c7c56dc73423f1ac3941e2fccef0
parentac7d7c9cbed92f21aa4a7555c4fee701227559a8
Check return value of udev_device_get_sysattr_value(); before using atoi();

Summary: udev_device_get_sysattr_value(); could return NULL, and using atoi(); with NULL make system crash

Test Plan: It is hard to make a case to retun NULL. I got this from aging test of a product.

Reviewers: cedric, raster, seoz, woohyun, Hermet, jaehwan

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1687
src/lib/eeze/eeze_net.c