Properly handle sscanf return value in ./src/secp256k1/src/tests.c #649

issue ghost opened this issue on July 14, 2019
  1. ghost commented at 4:40 AM on July 14, 2019: none

    A bug exists which allows the sh variable to be used uninitialized when sscanf returns EOF.

    Observe:

    https://github.com/bitcoin-core/secp256k1/blob/fa3301713549d118e57ebe6551d062903ddd6b63/src/tests.c#L5183-L5185

    A simple fix would be to explicitly test if sscanf's return value is equal to 1.

  2. real-or-random commented at 8:24 AM on July 14, 2019: contributor

    Good catch. Can you open a pull request to fix this?

  3. ghost commented at 3:09 PM on July 14, 2019: none

    Good catch. Can you open a pull request to fix this?

    Done.

  4. unknown closed this on Jul 14, 2019


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me