Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytecode API discrepancy: map_removekey return value #23

Open
micahsnyder opened this issue Aug 12, 2022 · 0 comments
Open

Bytecode API discrepancy: map_removekey return value #23

micahsnyder opened this issue Aug 12, 2022 · 0 comments

Comments

@micahsnyder
Copy link
Contributor

Describe the bug

I discovered that the documentation for the bytecode API function map_remove lies. It says:

Returns
0 on success, key was present
1 if key was not present
<0 if ksize doesn’t match keysize specified at table creation

in truth it used to return whatever cli_map_removekey() returned in https://github.com/Cisco-Talos/clamav/blob/clamav-0.105.1/libclamav/bytecode_api.c#L1432-L1438,
and that used to return 0 if the key was not present, and 1 if the key was present and removed: https://github.com/Cisco-Talos/clamav/blob/clamav-0.105.1/libclamav/hashtab.c#L893-L914

I'm making this issue because we haven't converted the old doxygen docs to markdown, and we also don't have a way at present to re-generate the PDF user manual. So when we do the documentation overhaul for the compiler project, we ought to fix this discrepancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant