On Thu, Oct 12, 2023 at 01:03:40PM +0300, Dan Carpenter wrote: > The simplest approach is to do a: > > git grep strscpy | grep " - 1" > > But the better approach would be to write a Smatch or Coverity check to > prevent these in the future. I meant Coccinelle not Coverity. Duh... Also btw, sometimes we want to keep the "don't necessarily terminate the string behavior". That's rare and ugly, but it does exist. regards, dan carpenter