Skip to content

Commit e6e1ff7

Browse files
committed
In parse_bool_with_len, avoid crash when no result pointer is passed. Probably
an unlikely call mode, but better be safe.
1 parent 8cd3755 commit e6e1ff7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/utils/adt/bool.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.46 2009/03/09 14:34:34 petere Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/bool.c,v 1.47 2009/03/09 16:49:12 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -109,7 +109,8 @@ parse_bool_with_len(const char *value, size_t len, bool *result)
109109
break;
110110
}
111111

112-
*result = false; /* suppress compiler warning */
112+
if (result)
113+
*result = false; /* suppress compiler warning */
113114
return false;
114115
}
115116

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy