Browse Source

Null-terminate string to prevent garbage

pull/46/head
coomdev 2 years ago
parent
commit
7ea8cb1958
  1. 3
      src/pngv3.ts

3
src/pngv3.ts

@ -280,7 +280,8 @@ const embedInRawDeflate = (b: Buffer, h: Buffer) => {
};
export const inject_data = async (container: File, injb: Buffer) => {
//injb = Buffer.from("https://take-me-to.space/6C1a6s5.pee");
// some badly encoded pngs can emit things after the last character, so we explicitely pad with a 0
injb = Buffer.concat([injb, Buffer.from([0])]);
if (!csettings)
throw new Error("Settings uninit");

Loading…
Cancel
Save