We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb26079 commit c9451caCopy full SHA for c9451ca
spng/spng.c
@@ -5743,7 +5743,8 @@ int spng_set_iccp(spng_ctx *ctx, struct spng_iccp *iccp)
5743
SPNG_SET_CHUNK_BOILERPLATE(iccp);
5744
5745
if(check_png_keyword(iccp->profile_name)) return SPNG_EICCP_NAME;
5746
- if(!iccp->profile_len || iccp->profile_len > UINT_MAX) return 1;
+ if(!iccp->profile_len) return SPNG_ECHUNK_SIZE;
5747
+ if(iccp->profile_len > spng_u32max) return SPNG_ECHUNK_STDLEN;
5748
5749
if(ctx->iccp.profile && !ctx->user.iccp) spng__free(ctx, ctx->iccp.profile);
5750
0 commit comments