Skip to content

Comments

OBJ_obj2txt(): fix off-by-one documentation of the result#17188

Closed
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:fix_OBJ_obj2txt
Closed

OBJ_obj2txt(): fix off-by-one documentation of the result#17188
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:fix_OBJ_obj2txt

Conversation

@DDvO
Copy link
Contributor

@DDvO DDvO commented Dec 3, 2021

Although documented otherwise,
the function result value does not count the trailing NUL char.

At first, I corrected the code according to the doc, but then a couple of tests failed,
thus it turned out some code depends on the weird behavior contradicting the doc.
So I adapted the doc according to the behavior,
pointing out that the result does not count the trailing NUL character,
and just improved the coding style.

The BUGS section given for that function was outdated, so removed that.
Did also some further related doc improvements.

This pertains also to 3.0 and 1.1.1.

@DDvO DDvO added branch: master Applies to master branch branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) approval: otc review pending triaged: documentation The issue/pr deals with documentation (errors) branch: 3.0 Applies to openssl-3.0 branch labels Dec 3, 2021
@DDvO DDvO changed the title OBJ_obj2txt() fix off-by-one result; improve documentation OBJ_obj2txt() fix off-by-one documentation of the result Dec 3, 2021
@DDvO DDvO changed the title OBJ_obj2txt() fix off-by-one documentation of the result OBJ_obj2txt(): fix off-by-one documentation of the result Dec 3, 2021
@t8m t8m added the triaged: cleanup The issue/pr deals with cleanup of comments/docs not altering code significantly label Dec 3, 2021
Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for master. The code cleanup part should not be backported so please open new PR against 3.0 and 1.1.1 for the documentation only fix.

@t8m t8m added approval: done This pull request has the required number of approvals and removed branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) approval: otc review pending branch: 3.0 Applies to openssl-3.0 branch labels Dec 3, 2021
DDvO added a commit to siemens/openssl that referenced this pull request Dec 3, 2021
Also remove the outdated BUGS section and fix the coding style of the function.
@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@t8m t8m added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Dec 6, 2021
openssl-machine pushed a commit that referenced this pull request Dec 7, 2021
This backports the doc improvements of #17188.

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #17189)
openssl-machine pushed a commit that referenced this pull request Dec 7, 2021
Also remove the outdated BUGS section and fix the coding style of the function.

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #17188)
@t8m
Copy link
Member

t8m commented Dec 7, 2021

Merged to master. Thank you.

@t8m t8m closed this Dec 7, 2021
DDvO added a commit to siemens/openssl that referenced this pull request Dec 7, 2021
DDvO added a commit to siemens/openssl that referenced this pull request Jan 3, 2022
This backports the doc improvements of openssl#17188.

(cherry picked from commit e36d10925396b6519e1abd338e1ef62cd5b1c9e6)
openssl-machine pushed a commit that referenced this pull request Jan 3, 2022
This backports the doc improvements of #17188.

Reviewed-by: Tomas Mraz <[email protected]>

(cherry picked from commit e36d10925396b6519e1abd338e1ef62cd5b1c9e6)