From: Simon Horman > Sent: 07 February 2023 15:43 ... > However, amongst other usages of the return value, > those callers also check for a return < 0 from this function. > Can that occur, in the sprintf or scnprintf case? That rather depends on what happens with calls like: snprintf(NULL, 0, "*%s%*s", MAX_INT, "", MAX_INT, ""); That is a whole bag of worms you don't want to put your hand into. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)