Opened 5 years ago

Closed 5 years ago

#10686 closed bug (fixed)

Building Haiku on Haiku fails

Reported by: jessicah Owned by: nobody
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Error I got was error initialising the mime DB. Using the system mimeset worked fine, where the haiku host version of mimeset did not.

Attachments (2)

Change History (11)

comment:1 Changed 5 years ago by jessicah

Has a Patch: set

comment:2 Changed 5 years ago by jessicah

Took quite some time to track down, but found it was an unterminated string in BEntry::set in the libbe_build tree. It now matches the behaviour in libbe's BEntry::_SetTo.

comment:3 Changed 5 years ago by korli

This should sync the code with hrev24425. You also need to adjust bufferSize to (B_PATH_NAME_LENGTH - 1).

comment:4 Changed 5 years ago by tqh

Looking at _kern_read_link it zero terminates the buffer for all normal cases except when *_bufferSize == 0, shouldn't it always zero-terminate instead?

See http://grok.bikemonkey.org/source/xref/haiku/src/build/libroot/fs.cpp#1065

comment:5 in reply to:  4 Changed 5 years ago by korli

Replying to tqh:

Looking at _kern_read_link it zero terminates the buffer for all normal cases except when *_bufferSize == 0, shouldn't it always zero-terminate instead?

You're not allowed to write to a zero-length buffer.

comment:6 Changed 5 years ago by jessicah

Has a Patch: unset

comment:7 Changed 5 years ago by jessicah

Has a Patch: set

comment:8 Changed 5 years ago by jessicah

Changed bufferSize to match the code in src/kits/storage/Entry.cpp

comment:9 Changed 5 years ago by stippi

Resolution: fixed
Status: newclosed

Patch applied, thanks a lot!

Note: See TracTickets for help on using tickets.