···11import { Data } from "effect";
2233-export class FlacError extends Data.TaggedError("FlacError")<{ message: string; cause?: unknown }> {}33+export class FlacError extends Data.TaggedError("FlacError")<{ message: string; cause?: unknown }> {}
+10-2
backend/src/flac/transformers.ts
···9999 // Validate number of fields to prevent DoS
100100 if (numberOfFields > MAX_VORBIS_FIELDS) {
101101 return yield* ParseResult.fail(
102102- new ParseResult.Type(ast, uint8Array, `Too many fields: ${numberOfFields} (max ${MAX_VORBIS_FIELDS})`),
102102+ new ParseResult.Type(
103103+ ast,
104104+ uint8Array,
105105+ `Too many fields: ${numberOfFields} (max ${MAX_VORBIS_FIELDS})`,
106106+ ),
103107 );
104108 }
105109···111115 // Bounds check: ensure we can read field length
112116 if (cursor + 4 > length) {
113117 return yield* ParseResult.fail(
114114- new ParseResult.Type(ast, uint8Array, `Buffer too short to read field ${i} length at cursor ${cursor}`),
118118+ new ParseResult.Type(
119119+ ast,
120120+ uint8Array,
121121+ `Buffer too short to read field ${i} length at cursor ${cursor}`,
122122+ ),
115123 );
116124 }
117125