Re: [PATCH 1/4, V2, libnftnl] tests: Fix segfaults due outbound access

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

 



On Sat, Aug 13, 2016 at 05:25:19PM +0200, Carlos Falgueras García wrote:
> Another possible solution is something like this:
> 
> 	  static const char *element2str(uint32_t element) {
> 	- 	if (element < MAX_ELEMENT)
> 	+ 	if (element < MAX_ELEMENT || !element2str_array[element])
> 	  		return "unkown";
> 	  	return element2str_array[element];
> 	  }
> 
> What do you think?

This only requires a oneliner patch and a very simple solution, please
do this.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux