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)
Sat, Dec 14, 7:16 AM
Unknown Object (File)
Mon, Dec 9, 2:31 AM
Unknown Object (File)
Nov 16 2024, 10:00 AM
Unknown Object (File)
Nov 15 2024, 6:50 PM
Unknown Object (File)
Nov 4 2024, 8:36 PM
Unknown Object (File)
Nov 4 2024, 10:23 AM
Unknown Object (File)
Oct 17 2024, 10:51 AM
Unknown Object (File)
Oct 2 2024, 3:38 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.