Skip to content

CID 1518587: Buffer not null terminated #10350

@maskit

Description

@maskit

healthchecks.cc

136  while (conf) {
137    conf->wd = inotify_add_watch(fd, conf->fname, IN_DELETE_SELF | IN_CLOSE_WRITE | IN_ATTRIB);
138    TSDebug(PLUGIN_NAME, "Setting up a watcher for %s", conf->fname);
   	
CID 1518587 (#1 of 1): Buffer not null terminated (BUFFER_SIZE)
7. buffer_size_warning: Calling strncpy with a maximum size argument of 4096 bytes on destination array fname of size 4096 bytes might leave the destination string unterminated.
139    strncpy(fname, conf->fname, MAX_PATH_LEN);
140    char *dname = dirname(fname);

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions