diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 3a67e7ce13..955c61da16 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -68,6 +68,7 @@ struct getout *new_getout(struct OperationConfig *config) ParameterError file2string(char **bufp, FILE *file) { struct curlx_dynbuf dyn; + DEBUGASSERT(MAX_FILE2STRING < INT_MAX); /* needs to fit in an int later */ curlx_dyn_init(&dyn, MAX_FILE2STRING); if(file) { char buffer[256]; @@ -94,6 +95,8 @@ ParameterError file2memory(char **bufp, size_t *size, FILE *file) if(file) { size_t nread; struct curlx_dynbuf dyn; + /* The size needs to fit in an int later */ + DEBUGASSERT(MAX_FILE2MEMORY < INT_MAX); curlx_dyn_init(&dyn, MAX_FILE2MEMORY); do { char buffer[4096];