Opened 3 years ago

Closed 3 years ago

#18765 closed defect (wontfix)

strlcat

Reported by: cypherpunks Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

OpenBSD: src/lib/libc/string/strlcat.c

Child Tickets

Attachments (1)

diff.diff (324 bytes) - added by cypherpunks 3 years ago.
diff

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by cypherpunks

Attachment: diff.diff added

diff

comment:1 Changed 3 years ago by cypherpunks

Different cypherpunk here. The submitted patch corresponds to the change between 1.13 and 1.14 (http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcat.c.diff?r1=1.13&r2=1.14&f=h) but misses the change above that line which changes

if (n == 0)

to

if (n-- == 0)

I'm suggesting to simply replace the file with the newest version available from OpenBSD (http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcat.c) because it has been improved since Tor included it.

Last edited 3 years ago by cypherpunks (previous) (diff)

comment:2 Changed 3 years ago by nickm

What is the actual improvement here?

comment:3 in reply to:  2 Changed 3 years ago by cypherpunks

Replying to nickm:

What is the actual improvement here?

When looking at the diff of the version Tor includes and the current OpenBSD version (see http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcat.c.diff?r1=1.8&r2=1.16&f=h) we can see that the license is updated, the useless rcsid variable is removed, the register keyword isn't used anymore, variable names are more descriptive, more use of const, and some comments are improved. AFAICT functionality has not changed.

I assume the TS thought there was a bug in the code, but i don't think it has (see comment:1).

Last edited 3 years ago by cypherpunks (previous) (diff)

comment:4 Changed 3 years ago by nickm

Resolution: wontfix
Status: newclosed

If there's no fix here, I say we leave the code as-is.

Note: See TracTickets for help on using tickets.