AmendHub

Download:

jcs

/

subtext

/

amendments

/

306

session: I guess it should be 127 then, to store the null in 128


jcs made amendment 306 about 1 year ago
--- session.c Mon Feb 20 15:51:08 2023 +++ session.c Wed Feb 22 20:56:00 2023 @@ -1242,7 +1242,7 @@ session_expand_var(struct session *session, char *ivar *ret = (char *)&retval; retlen = 0; - if (sscanf(ivar, "%128[^|]|%ld%n", &var, &retsize, &count) == 2 && + if (sscanf(ivar, "%127[^|]|%ld%n", &var, &retsize, &count) == 2 && count > 0) { /* field of fixed length, either truncated or padded */ if (retsize > sizeof(retval))