mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-12 23:01:14 +01:00
gpgscm: Fix compact vector encoding.
* tests/gpgscm/scheme-private.h (struct cell): Use uintptr_t for '_flags'. This way, '_flags' has the size of a machine word. -- The compact vector representation introduced in 49e2ae65 requires that we can tell apart pointers and type flags. This did not work on 64-bit big-endian architectures. Fixes a crash on 64-bit big-endian architectures. Hat-tip-to: gniibe Fixes-commit: 49e2ae65e892f93be7f87cfaae3392b50a99e4b1 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
9c9fde1495
commit
bf8b5e9042
@ -3,6 +3,7 @@
|
|||||||
#ifndef _SCHEME_PRIVATE_H
|
#ifndef _SCHEME_PRIVATE_H
|
||||||
#define _SCHEME_PRIVATE_H
|
#define _SCHEME_PRIVATE_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include "scheme.h"
|
#include "scheme.h"
|
||||||
/*------------------ Ugly internals -----------------------------------*/
|
/*------------------ Ugly internals -----------------------------------*/
|
||||||
/*------------------ Of interest only to FFI users --------------------*/
|
/*------------------ Of interest only to FFI users --------------------*/
|
||||||
@ -42,7 +43,7 @@ typedef struct port {
|
|||||||
|
|
||||||
/* cell structure */
|
/* cell structure */
|
||||||
struct cell {
|
struct cell {
|
||||||
unsigned int _flag;
|
uintptr_t _flag;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
char *_svalue;
|
char *_svalue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user