Re: [PATCH v2] drm/i915: silence coverity warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Lionel Landwerlin (2017-11-02 12:18:27)
> Because dev_priv is 0-ed it's not currently an issue, but since we
> have dev_priv->perf.oa.test_config.uuid size at uuid + 1, we could
> just copy the null character and silence this warning.
> 
> Detected by CoverityScan, CID#369632 ("Buffer not null terminated")
> 
> v2: Use strlcpy instead of strncpy (Chris)
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

Since test_config.uuid[UUID_STRING_LEN + 1], this looks about as solid a
defence against static analysers as we can make,
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux