From d08f68523ea9a39af8176703e48fd47a987893b5 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Thu, 4 Jun 2026 18:46:46 +0200 Subject: chore: address static analyzer warnings --- pplx_embed.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pplx_embed.c') diff --git a/pplx_embed.c b/pplx_embed.c index 35bd739..2c0ade6 100644 --- a/pplx_embed.c +++ b/pplx_embed.c @@ -388,8 +388,11 @@ static int tensor_has_supported_shape(const safetensors_file_t *sf, } size_t bytes; - if (mul_size(numel, elem_size, &bytes) != 0 || - t->data_size != bytes) { + if (mul_size(numel, elem_size, &bytes) != 0) { + fprintf(stderr, "pplx: tensor data too large for %s\n", name); + return 0; + } + if (t->data_size != bytes) { fprintf(stderr, "pplx: bad data size for %s: got %zu, expected %zu\n", name, t->data_size, bytes); return 0; -- cgit v1.3.1