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

[debian-hurd-Patches][312483] sound/hexter-0.6.1



Patches item #312483, was changed at 2010-05-01 10:18 by Gokturk Yuksek
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410472&aid=312483&group_id=30628

Status: Open
Priority: 3
Submitted By: Gokturk Yuksek (gokturk-guest)
Assigned to: Nobody (None)
Summary: sound/hexter-0.6.1 
Category: posix
Group: unreviewed
Resolution: None


Initial Comment:
Proposed patch solves PATH_MAX problem by calling 'snprintf' function with (NULL, 0, ...)  parameters to calculate how many characters to read (including the \0 character), and then calling it again with an allocated buffer to do actual operation.

Build log is also attached.

----------------------------------------------------------------------

Comment By: Gokturk Yuksek (gokturk-guest)
Date: 2010-05-02 05:11

Message:
Why +1+1? If i'm not mistaken, strlen() returns the length of the string without the null character so strlen() + 1 should give the real length of the string and snprintf(..., "%s/") should exactly fit into the buffer.

I don't know why i couldn't see the simpler solution, thanks for the catch up though :)

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibault)
Date: 2010-05-01 10:41

Message:
Mmm, wouldn't it be simpler to allocate strlen(project_directory)+1+1?


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410472&aid=312483&group_id=30628


Reply to: