Files
Marius CiepluchandClaude Fable 5.1 c3e841003c fix(pair-corpus-honesty): re-harvest curl/OpenSSL excerpts, restore Juliet fixtures
Tasks 3.3 and 4.1.

- vfc curl and openssl-cve-2021-3449 excerpts re-harvested through the
  shared library: whole functions with upstream_start headers, the
  vendored key redacted code-safely, no truncated bodies.
- vfc/recipes.toml carries mode, fix_path and function anchors;
  training/manifest.jsonl regenerated.
- Juliet CWE-121 strcpy pair gets its buffer declarations back so the
  vulnerable side is a real overflow again.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
2026-09-05 10:45:42 +02:00

19 lines
579 B
C

/* Juliet 1.3 CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01 (CC0).
* goodG2B(): same strcpy; data points at the 11-byte buffer, so the copy fits. */
#include <string.h>
#define SRC_STRING "AAAAAAAAAA"
static void CWE121_char_declare_cpy_01_goodG2B()
{
char * data;
char dataBadBuffer[10];
char dataGoodBuffer[10+1];
/* FIX: Set a pointer to a buffer that leaves room for a NULL terminator */
data = dataGoodBuffer;
data[0] = '\0'; /* null terminate */
{
char source[10+1] = SRC_STRING;
strcpy(data, source);
}
}