[DragonFlyBSD - Bug #3009] (Closed) lib/* : three problems

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Mon Apr 10 22:16:11 PDT 2017


Issue #3009 has been updated by dillon.

Status changed from New to Closed

Limit the sscanf() and remove the redundant conditions as specified.

Fix committed by Matt

----------------------------------------
Bug #3009: lib/* : three problems
http://bugs.dragonflybsd.org/issues/3009#change-13123

* Author: dcb
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
1.

dragonfly/lib/libc/net/ether_addr.c:73]: (warning) sscanf() without field width limits can crash with huge input data.

Looks like the %s needs limiting, maybe to MAXHOSTNAMELEN

2.

[dragonfly/lib/libdevstat/devstat.c:612]: (style) Redundant condition: (matches[i].match_fields&DEVSTAT_MATCH_PASS)==0. 'A || (!A && B)' is equivalent to 'A || B'

3.

[dragonfly/lib/libdevstat/devstat.c:621]: (style) Redundant condition: (matches[i].match_fields&DEVSTAT_MATCH_PASS)==0. 'A || (!A && B)' is equivalent to 'A || B'

Duplicate.




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list