aboutsummaryrefslogtreecommitdiff
path: root/pplx_embed.c
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-04 18:46:46 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 08:27:03 +0200
commitd08f68523ea9a39af8176703e48fd47a987893b5 (patch)
tree8f9b9d05c6b3fcb3d59c424e9e7b888f70e71b77 /pplx_embed.c
parent8fc09516a8028a754e8cd4aecefa0677791379cf (diff)
downloadffwd-d08f68523ea9a39af8176703e48fd47a987893b5.tar.gz
ffwd-d08f68523ea9a39af8176703e48fd47a987893b5.zip
chore: address static analyzer warnings
Diffstat (limited to 'pplx_embed.c')
-rw-r--r--pplx_embed.c7
1 files changed, 5 insertions, 2 deletions
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;