[PATCH] ivi-controller: fixed string copy in controller_screen_screenshot

mateuszx.potrola at intel.com mateuszx.potrola at intel.com
Wed Mar 30 08:30:12 EDT 2016

With earlier implementation memory for NULL byte of l->filename string
was not being allocated by malloc (strlen is returning length of string
without NULL terminating byte) which may result in some random
characters appended in filename string.
Now strdup is begin used for string copy instead of malloc/strcpy.

Signed-off-by: Mateusz Polrola <mateuszx.potrola at intel.com>
 weston-ivi-shell/src/ivi-controller-impl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263

This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ivi-controller-fixed-string-copy-in-controller_scree.patch
Type: text/x-patch
Size: 868 bytes
Desc: not available
URL: <http://lists.genivi.org/pipermail/genivi-ivi-layer-management_lists.genivi.org/attachments/20160330/060c9782/attachment.patch>

More information about the genivi-ivi-layer-management mailing list