Bad callback logic #300

issue theuni opened this issue on September 1, 2015
  1. theuni commented at 6:05 PM on September 1, 2015: contributor

    Given that ARG_CHECK is defined as:

    #define ARG_CHECK(cond) do { \
        if (EXPECT(!(cond), 0)) { \
            ctx->illegal_callback.fn(#cond, ctx->illegal_callback.data); \
            return 0; \
        } \
    } while(0)
    

    These checks (17 of 'em from a quick grep) make no sense and are doomed to explode:

    ARG_CHECK(ctx != NULL);
    
  2. gmaxwell commented at 6:14 PM on September 1, 2015: contributor

    Haha.

  3. sipa commented at 7:06 PM on September 1, 2015: contributor

    Good catch!

  4. gmaxwell added this to the milestone initial release on Sep 17, 2015
  5. sipa commented at 11:07 PM on September 29, 2015: contributor

    Fixed by #301

  6. sipa closed this on Sep 29, 2015


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-05-19 06:53 UTC