mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Some more FLEXIBLE_ARRAY_MEMBER fixes.
This commit is contained in:
@ -892,7 +892,8 @@ pqSaveMessageField(PGresult *res, char code, const char *value)
|
||||
|
||||
pfield = (PGMessageField *)
|
||||
pqResultAlloc(res,
|
||||
sizeof(PGMessageField) + strlen(value),
|
||||
offsetof(PGMessageField, contents) +
|
||||
strlen(value) + 1,
|
||||
TRUE);
|
||||
if (!pfield)
|
||||
return; /* out of memory? */
|
||||
|
@ -145,7 +145,7 @@ typedef struct pgMessageField
|
||||
{
|
||||
struct pgMessageField *next; /* list link */
|
||||
char code; /* field code */
|
||||
char contents[1]; /* field value (VARIABLE LENGTH) */
|
||||
char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */
|
||||
} PGMessageField;
|
||||
|
||||
/* Fields needed for notice handling */
|
||||
@ -637,7 +637,7 @@ extern void pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending,
|
||||
* The SSL implementatation provides these functions (fe-secure-openssl.c)
|
||||
*/
|
||||
extern void pgtls_init_library(bool do_ssl, int do_crypto);
|
||||
extern int pgtls_init(PGconn *conn);
|
||||
extern int pgtls_init(PGconn *conn);
|
||||
extern PostgresPollingStatusType pgtls_open_client(PGconn *conn);
|
||||
extern void pgtls_close(PGconn *conn);
|
||||
extern ssize_t pgtls_read(PGconn *conn, void *ptr, size_t len);
|
||||
|
Reference in New Issue
Block a user