Last character of incoming string was mistakenly stripped. This patch
fixes the issue.
Bug
1416849
Change-Id: I8741504bb5887ad54b93a5066a99bfecc55cff9f
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/345196
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Greg Heinrich <gheinrich@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
size_t n;
struct sysedp_consumer *consumer;
- n = count > SYSEDP_NAME_LEN ? SYSEDP_NAME_LEN : count;
+ n = count > SYSEDP_NAME_LEN - 1 ? SYSEDP_NAME_LEN - 1 : count;
strncpy(name, s, n);
- name[n-1] = 0;
+ name[n] = 0;
consumer = sysedp_get_consumer(strim(name));
if (!consumer)