PR/58136: Paul Ripke: Fix use after free.
This commit is contained in:
parent
30112b560c
commit
28614955c7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gettext.c,v 1.31 2019/10/03 16:35:57 christos Exp $ */
|
||||
/* $NetBSD: gettext.c,v 1.32 2024/04/13 02:01:38 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 Citrus Project,
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: gettext.c,v 1.31 2019/10/03 16:35:57 christos Exp $");
|
||||
__RCSID("$NetBSD: gettext.c,v 1.32 2024/04/13 02:01:38 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -176,6 +176,9 @@ pgettext_impl(const char *domainname, const char *msgctxt, const char *msgid1,
|
|||
msgid2, n, category);
|
||||
free(msgctxt_id);
|
||||
|
||||
if (translation == msgctxt_id)
|
||||
return msgid1;
|
||||
|
||||
p = strchr(translation, '\004');
|
||||
if (p)
|
||||
return p + 1;
|
||||
|
|
Loading…
Reference in New Issue