aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 5ea364bce..fd30216f5 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -315,12 +315,12 @@ ngx_log_debug(cf->log, "TOKEN START");
}
if (h->pos - start) {
- ngx_memcpy(h->start, start, h->pos - start);
+ ngx_memcpy(h->start, start, (size_t) (h->pos - start));
}
n = ngx_read_file(&cf->conf_file->file,
h->start + (h->pos - start),
- h->end - (h->start + (h->pos - start)),
+ (size_t) (h->end - (h->start + (h->pos - start))),
cf->conf_file->file.offset);
if (n == NGX_ERROR) {
@@ -462,7 +462,8 @@ ngx_log_debug(cf->log, "%d:%d:%d:%d:%d '%c'" _
if (found) {
ngx_test_null(word, ngx_push_array(cf->args), NGX_ERROR);
ngx_test_null(word->data,
- ngx_palloc(cf->pool, h->pos - start + 1),
+ ngx_palloc(cf->pool,
+ (size_t) (h->pos - start + 1)),
NGX_ERROR);
for (dst = word->data, src = start, len = 0;