diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2026-05-01 02:57:51 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2026-05-01 02:58:48 +0000 |
| commit | 910f78a5143af32dfcb237a463397aa0c31c07df (patch) | |
| tree | 4f283a640a820fe853bdf1e9870be0f064279efc /include | |
| parent | d98f4f0698ef0c5178882c544b4c38542d4780f0 (diff) | |
Diffstat (limited to 'include')
| -rw-r--r-- | include/ssp/stdio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ssp/stdio.h b/include/ssp/stdio.h index 17bda8d3ee2d..73c601c408ce 100644 --- a/include/ssp/stdio.h +++ b/include/ssp/stdio.h @@ -75,6 +75,13 @@ __ssp_redirect_raw_impl(char *, gets_s, gets_s, } retbuf = __ssp_real(gets_s)(buf, len); + + /* + * If the implementation did *not* handle the case correctly, then + * there's a risk that they could have corrupted us into not failing + * here. We have tests that cover this, so we'll just count on finding + * a broken implementation early on in a less hostile environmnt. + */ if (need_fail && retbuf != NULL) __chk_fail(); return (retbuf); |
