fold/tests/fixtures/organic/libssh2_cve_2019_17498_vulnerable.cpp
trvon 2dcbdbc75d
feat: harden Fold quality guard
Preserve source, binary, and runtime evidence boundaries while making precision and performance regressions reproducible.

- decompose analysis orchestration into bounded modules
- add differential, metamorphic, organic, and Yams change-time gates
- fix detector, P-Code, fuzz sanitizer, and report identity precision
2026-07-13 15:05:35 -04:00

13 lines
358 B
C++

// Adapted semantic slice of the unsigned datalen - 13 check in
// libssh2 packet.c at revision 8b3cf0b17c1b84a138bed9423a9e0743452b4de9.
#include <cstddef>
bool acceptsPacket(std::size_t message_len, std::size_t datalen) {
if (message_len < datalen - 13)
return false;
return true;
}
int main() {
return acceptsPacket(1, 4) ? 0 : 1;
}