Created
May 11, 2012 10:45
-
-
Save fumiyas/2658915 to your computer and use it in GitHub Desktop.
[PATCH] libiconv-1.10-ja detects a false ENOMEM error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iconv_open() detects a false ENOMEM error on aliases_lookup_with_env() | |
if errno is already set to ENOMEM and getenv("CHARSET_ALIAS") | |
returns NULL. | |
-- SATOH Fumiyasu @ OSS Technology, Inc., 2009-03-26 | |
diff -rup libiconv-1.10-ja/lib/iconv.c libiconv-1.10-ja-errno/lib/iconv.c | |
--- libiconv-1.10-ja/lib/iconv.c 2009-03-25 21:06:55.000000000 +0900 | |
+++ libiconv-1.10-ja-errno/lib/iconv.c 2009-03-25 21:06:16.000000000 +0900 | |
@@ -246,6 +246,8 @@ aliases_lookup_with_env (register const | |
char *new_name; | |
const struct alias *ap = NULL; | |
+ errno = 0; | |
+ | |
charset_alias = getenv("CHARSET_ALIAS"); | |
if (!charset_alias) { | |
return NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment