#1 :988
mod_http_cache.c:988:2: error: ‘strncpy’ output may be truncated copying 2 bytes from a string of length 256 [-Werror=stringop-truncation]
strncpy(uuid_dir, uuid_str, 2);
- mod_http_cache.c:988
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(uuid_dir, uuid_str, 2);
#2 :276
mod_http_cache.c:276:2: error: ‘strncpy’ specified bound 255 equals destination size [-Werror=stringop-truncation]
strncpy(domain_buf, start, domain_buf_len);
- mod_http_cache.c:276
- strncpy(domain_buf,start, domain_buf_len);
+ strncpy(domain_buf,start, sizeof(domain_buf) - 1 );