aboutsummaryrefslogtreecommitdiffstats
path: root/dhcpcd_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove set but not used variableErik Kline2015-02-111-3/+3
| | | | | | Bug: 19245503 Change-Id: I57002952eadf4d5b7636e78fc0846c915cceb5dd
* Fun with buffer overrruns.Erik Kline2014-12-121-0/+146
In get_option(): don't read past the end of the option buffer. Also add a small unittest to verify sane behaviour for the above. The dhcpcd code is not easily refactored into a library, nor is it entirely possible to include some header files directly since some structures use C++ reserved keywords ("new") for variable names. In print_option(): use of snprintf() returns the length that /would/ have been written. Add checks that the output buffer is not overrun when printing. Bug: 18356137 Bug: 18356135 Change-Id: I0f907b8a952208749226ba034a416d773e068f8a (cherry picked from commit c1c270dba20afa63a5b7769646cf721d0fa7c431)