Project

General

Profile

Bug #3009

lib/* : three problems

Added by dcb about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/04/2017
Due date:
% Done:

0%


Description

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.

History

#1 Updated by dillon about 1 month ago

  • Status changed from New to Closed

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

Fix committed by Matt

Also available in: Atom PDF