beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
194 stars 154 forks source link

Check return value of fscanf() #222

Open szsam opened 1 year ago

szsam commented 1 year ago

The variable old_pid is read, but may not have been written by fscanf(). It should be guarded by a check that the call to fscanf returns at least 1.