Commit: df29632772171d5fd0e71c518fc3753adb11d0c0
Parent: 21acf2283cacf0c029f2cea82380f4744a1dbcb5
Author: Anderson Lizardo <anderson.lizardo@openbossa.org>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2013-01-06 18:14:27
Tree: feb0a7cd928143909eb6e4e862ce6e0f4a006665

input: Refactor req->name composition code Use snprintf() instead of strncpy()/strcat()/strncat() to avoid error-prone size calculations. Note that this commit introduces a slight change: if Service Description and Provider Name are used to compose req->name, the old code built it as: [up to 126 bytes of Provider Name][whitespace][up to 127 bytes of Service Description, limited to req->name remaining buffer size] Now it should be: [up to 127 bytes of Provider Name][whitespace + Service Description, limited to req->name remaining buffer size] Hopefully, this change will not affect normal usage.

Diffstat

M profiles/input/device.c | 22 ++++++++++- - - - - - - - - - - -

1 files changed, 10 insertions(+), 12 deletions(-)

View Full Diff | Patch