Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
50 lines
947 B
C
50 lines
947 B
C
#include "git-compat-util.h"
|
|
#include "date.h"
|
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|
{
|
|
int local;
|
|
int num;
|
|
char *str;
|
|
int16_t tz;
|
|
timestamp_t ts;
|
|
enum date_mode_type dmtype;
|
|
struct date_mode dm;
|
|
|
|
if (size <= 4)
|
|
/*
|
|
* we use the first byte to fuzz dmtype and the
|
|
* second byte to fuzz local, then the next two
|
|
* bytes to fuzz tz offset. The remainder
|
|
* (at least one byte) is fed as input to
|
|
* approxidate_careful().
|
|
*/
|
|
return 0;
|
|
|
|
local = !!(*data++ & 0x10);
|
|
num = *data++ % DATE_UNIX;
|
|
if (num >= DATE_STRFTIME)
|
|
num++;
|
|
dmtype = (enum date_mode_type)num;
|
|
size -= 2;
|
|
|
|
tz = *data++;
|
|
tz = (tz << 8) | *data++;
|
|
size -= 2;
|
|
|
|
str = xmemdupz(data, size);
|
|
|
|
ts = approxidate_careful(str, &num);
|
|
free(str);
|
|
|
|
dm = date_mode_from_type(dmtype);
|
|
dm.local = local;
|
|
show_date(ts, (int)tz, dm);
|
|
|
|
date_mode_release(&dm);
|
|
|
|
return 0;
|
|
}
|