elm test config - ensure buffer does't get overfilled with lots of profs
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 7 Nov 2018 16:14:16 +0000 (16:14 +0000)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 20 Nov 2018 06:56:20 +0000 (15:56 +0900)
commitc3365ed5049d2d10ad900e3f39a4dc9b3ed3754e
tree8df81babdf814850bc5b73ef25307b6a280e4c2d
parente2712448ffc8cce7653b4d31895e5394386e5ef8
elm test config - ensure buffer does't get overfilled with lots of profs

the "let's use strncpy" brigade of course made sure to use it to "be
secure" and yet still overtflow the buffer... this is a perfect lesson
in DOP NOT USE strncpy unless you carefully think about the code and
get it right. i mean things like:

   strncat(buf, profiles[i], strlen(profiles[i]) + 1);

is blindly using strncpy ... and it's no better than strcpy, but mroe
complex and giving the illusion of "it's safe". pay attention to your
code people. please. thanks.
src/bin/elementary/test_config.c