On 2012-01-21 17:36, Andreas Färber wrote: > Am 21.01.2012 14:43, schrieb Jan Kiszka: >> By using strncasecmp, we allow for arbitrary characters after the >> "on"/"off" string. Fix this by switching to strcasecmp. >> >> Signed-off-by: Jan Kiszka > > Reviewed-by: Andreas Färber > > An alternative might be to increase the char count by one. For a const > char* parameter I see the responsibility for nul-terminating at the > caller though, so this seems right. Did you check all callers? For any normal function that takes a char * string without a maximum length, the responsibility for terminating is on caller side. Also because we checks against patterns of different length. So we don't need to jump through hoops here. Jan