libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 97c7e29a7efe0daf21818492605da2f00be1b3c4
parent 399df7968ed63077e4762e3a06e314717c916f2e
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed, 24 Oct 2018 19:10:57 +0200

Add format validation check for the Tundra loader

Diffstat:
Msrc/loaders/tundra.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -29,6 +29,11 @@ int ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) return -1; } + if (ctx->length < TUNDRA_HEADER_LENGTH) { + ctx->error = ANSILOVE_FORMAT_ERROR; + return -1; + } + // some type declarations struct fontStruct fontData; char tundra_version;