Elektrine lite

← Feed

@PeterLudemann@mathstodon.xyz

Post #3759240

2026-07-11 23:31 UTC

orbisai0security did a drive-by check of some sample code, and raised a "critical" security issue with a fix. It flagged a strpy() -- I agree, that is a security issue -- but replaced it with a call to snprintf(), plus a fair amount of boilerplate commentary. Where did this ridiculous replacement code come from? Sure, strlcpy() is BSD, but strncpy() is part of the C standard and is made trivially safe by: strncpy(dst, src, size of dst); dst[sizeof dst - 1] = '\0'; If this is indicative of what "AI" can do when writing code, we'll need much faster CPUs. https://github.com/SWI-Prolog/swipl-devel/pull/1505

Replies (0)

No replies.