Project

General

Profile

Actions

Bug #1986

closed

libima misuses gethostname

Added by Rich Lowe over 9 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2012-01-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

libima uses gethostname() as if it returns a length, rather than accepts one, in its second argument. We don't get warned about this because we also don't include unistd.h, so nobody notices.

We specify the buffer we have is as long as whatever happened to be on the stack at the time. Bad.

Actions #1

Updated by Rich Lowe over 9 years ago

Actually, we're also passing the address of dwStrLength, so not "whatever was on the stack" but "the address of the stack".

Actions #2

Updated by Matt Barden almost 8 years ago

  • Status changed from New to Feedback
  • Assignee set to Dan McDonald
  • % Done changed from 0 to 100
Actions #3

Updated by Rich Lowe almost 8 years ago

  • Status changed from Feedback to Resolved

Resolved in 5d539a8

Actions

Also available in: Atom PDF