Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
pacemaker
pacemaker-pengine-sprintf-snprintf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-pengine-sprintf-snprintf.patch of Package pacemaker
commit c8b895eed1f2afb7a0ccbd4ff9cf2cdba9e3d605 Author: Jan Pokorný <jpokorny@redhat.com> Date: Wed Sep 23 23:49:25 2015 +0200 Medium: pengine: sprintf -> snprintf Signed-off-by: Jan Pokorný <jpokorny@redhat.com> Index: pacemaker/pengine/allocate.c =================================================================== --- pacemaker.orig/pengine/allocate.c +++ pacemaker/pengine/allocate.c @@ -2395,14 +2395,16 @@ expand_node_list(GListPtr list) if (node->details->uname) { int existing_len = 0; - int len = 2 + strlen(node->details->uname); + int len = 2 + strlen(node->details->uname); /* space + null byte */ if(node_list) { existing_len = strlen(node_list); } crm_trace("Adding %s (%dc) at offset %d", node->details->uname, len - 2, existing_len); node_list = realloc_safe(node_list, len + existing_len); - sprintf(node_list + existing_len, "%s%s", existing_len == 0 ? "":" ", node->details->uname); + snprintf(node_list + existing_len, len, + "%s%s", existing_len == 0 ? "":" ", node->details->uname); + } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor