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

import-object: Avoid integer truncation on 32-bit platforms #609

Merged
merged 1 commit into from
Dec 4, 2023

Commits on Dec 4, 2023

  1. import-object: Avoid integer truncation on 32-bit platforms

    The build fails when compiling for 32-bit platforms with
    -Werror=incompatible-pointer-types:
    
      CFLAGS="-m32 -march=i686 -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion" setarch i686 -- meson setup _build
      setarch i686 -- meson compile -C _build -v
      ...
    
      ../p11-kit/import-object.c: In function ‘add_attrs_pubkey_rsa’:
      ../p11-kit/import-object.c:223:62: error: passing argument 3 of ‘p11_asn1_read’ from incompatible pointer type [-Werror=incompatible-pointer-types]
        223 |         attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen);
            |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~
            |                                                              |
            |                                                              long unsigned int *
    
    Reported by Sam James in:
    p11-glue#608
    
    Signed-off-by: Daiki Ueno <[email protected]>
    ueno committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    d938f4a View commit details
    Browse the repository at this point in the history