__get_argv features this snippet: int rc, len = MAXSTRINGLEN; ... rc = strlcpy (str, buf, len); str += rc; len -= rc; However, strlcpy returns the length of the input string, not the number of bytes copied. So it's possible to have rc > len, and then the subtraction will make len negative. Since strlcpy takes a size_t (unsigned), that len is cast to a large positive number in the next iteration, so the buffer protection is effectively destroyed. __get_compat_argv is also broken in this way.
commit f754097
(In reply to comment #1) > commit f754097 While this commit did seem to solve the issue at hand, we decided to rewrite __get_argv in pure script mode. (commit a2d399c8)