Page MenuHomeFreeBSD

Fix empty label handling for cd9660.
ClosedPublic

Authored by trasz on Jun 15 2015, 6:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 14, 1:52 PM
Unknown Object (File)
Sat, May 11, 11:30 PM
Unknown Object (File)
Sat, May 11, 1:51 AM
Unknown Object (File)
Fri, May 10, 12:40 PM
Unknown Object (File)
Fri, May 10, 12:35 PM
Unknown Object (File)
Fri, May 10, 12:32 PM
Unknown Object (File)
Mon, Apr 29, 4:53 PM
Unknown Object (File)
Mon, Apr 29, 4:50 PM
Subscribers

Details

Summary

Without this fix, empty label is being incorrectly reported as a one
character string, " ".

Similar fix might be needed for geom_label(4) module this code come
from.

PR: 200828

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz retitled this revision from to Fix empty label handling for cd9660. Without this fix, empty label is being incorrectly reported as a one character string, " ". Similar fix might be needed for geom_label(4) module this code come from. PR: 200828.
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)

Looks OK to me although I'd have a small preference for changing this to avoid the signed i.

trasz retitled this revision from Fix empty label handling for cd9660. Without this fix, empty label is being incorrectly reported as a one character string, " ". Similar fix might be needed for geom_label(4) module this code come from. PR: 200828 to Fix empty label handling for cd9660..
trasz edited edge metadata.
trasz updated this object.

Deduplicate the code and add the same fix for geom_label(4).

usr.sbin/fstyp/fstyp.c
108–109 ↗(On Diff #6235)

Perhaps call this rtrim instead. There's a precedent in various languages for ltrim/rtrim/trim, with trim removing both leading and trailing space.

asomers edited edge metadata.

I agree with emaste's comment. Other than that, LGTM.

This revision is now accepted and ready to land.Jun 16 2015, 4:14 PM

Ed, does it look ok? If so, can you mark it Accepted, so you end up in "Reviewed by"? Thanks!

emaste edited edge metadata.
This revision was automatically updated to reflect the committed changes.