Permalink
Browse files

Fixes EUCA-3962 where strncpy() is used instead of safe_strncpy(). Fixes

Coverity issue #11088.
  • Loading branch information...
gelinasc committed Nov 21, 2012
1 parent 65b1584 commit e6e91199204dbbb6b4abdba0c0bf63e2c199c1ae
Showing with 2 additions and 2 deletions.
  1. +2 −2 node/xml.c
View
@@ -127,7 +127,7 @@ static void init (struct nc_state_t * nc_state)
config_use_virtio_root = nc_state->config_use_virtio_root;
config_use_virtio_disk = nc_state->config_use_virtio_disk;
config_use_virtio_net = nc_state->config_use_virtio_net;
- strncpy (xslt_path, nc_state->libvirt_xslt_path, sizeof (xslt_path));
+ safe_strncpy (xslt_path, nc_state->libvirt_xslt_path, sizeof (xslt_path));
}
initialized = 1;
}
@@ -608,7 +608,7 @@ int main (int argc, char ** argv)
logprintfl (EUCAERROR, "required parameters are <XSLT stylesheet path>\n");
return 1;
}
- strncpy (xslt_path, argv[1], sizeof (xslt_path));
+ safe_strncpy (xslt_path, argv[1], sizeof (xslt_path));
char * in_path = tempnam (NULL, "xml-");
char * out_path = tempnam (NULL, "xml-");

0 comments on commit e6e9119

Please sign in to comment.