Project

General

Profile

Bug #3002

usr.sbin/mfiutil/mfi_foreign.c:189: buffer too small ?

Added by dcb 9 months ago. Updated 8 months ago.

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

0%


Description

usr.sbin/mfiutil/mfi_foreign.c:189]: (error) Buffer is accessed out of bounds: prefix

Source code is

sprintf(prefix, "Foreign configuration preview %d", cfgidx);

but

char prefix[26];

I count at least 32 chars written by sprintf into prefix.
Suggest increase size of prefix.

I don't know which compiler this code is compiled by, but I
do know that recent version of gcc have a preprocessor
macro called _FORTIFY_SOURCE=2 which should detect this
kind of problem.

History

#1 Updated by dillon 8 months ago

  • Status changed from New to Closed

Fix committed by Matt

Also available in: Atom PDF