[rds-devel] [PATCH net-next] rds: debug: fix null check on static array

Sowmini Varadhan sowmini.varadhan at oracle.com
Wed Dec 6 03:32:11 PST 2017


On (12/06/17 10:47), Prashant Bhole wrote:
> 
> t_name cannot be NULL since it is an array field of a struct.
> Replacing null check on static array with string length check using
> strnlen()

t_name is always initialized for all rds transports today,  and would
be all zeros unless someone stomped over that memory (in which case
there could be more serious issues than a busted debug string) but
it's good  to be safe and check I suppose.

Acked-by: Sowmini Varadhan <sowmini.varadhan at oracle.com>

--Sowmini




More information about the rds-devel mailing list