The strncpy with character size of fixed size string still
causes stringop-truncation warning in ASAN build, so resolve
the issue with strncpy of full size including terminated
character.
Change-Id: I09be11b837c3c1ed7f34e48b242bad912cbb92ca
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
return MMI_ERROR_OUT_OF_MEMORY;
}
- strncpy((*cloned)->name, port_s->name, MMI_NAME_MAX_LENGTH - 1);
- (*cloned)->name[MMI_NAME_MAX_LENGTH - 1] = '\0';
+ strncpy((*cloned)->name, port_s->name, MMI_NAME_MAX_LENGTH);
(*cloned)->type = port_s->type;
(*cloned)->data_type = port_s->data_type;
(*cloned)->callbacks = port_s->callbacks;