diff --git a/src/session/download.c b/src/session/download.c index 376a2944..58e68798 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -1197,10 +1197,7 @@ do_type_query(struct type_query *type_query, unsigned char *ct, struct mime_hand } if (handler && handler->program) { - int programlen = strlen(handler->program); - - programlen = int_min(programlen, MAX_STR_LEN); - memcpy(field, handler->program, programlen); + safe_strncpy(field, handler->program, MAX_STR_LEN); } /* xgettext:no-c-format */