From 2f25ac7fb8fc46a45ec0e3e746a6104becff6ce6 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Mon, 19 Jul 2010 22:59:53 +0000 Subject: remove unguarded atom creation to prevent DOS attacks. closes COUCHDB-829 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@965673 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_os_process.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/couchdb/couch_os_process.erl') diff --git a/src/couchdb/couch_os_process.erl b/src/couchdb/couch_os_process.erl index 070b86fc..5776776b 100644 --- a/src/couchdb/couch_os_process.erl +++ b/src/couchdb/couch_os_process.erl @@ -93,10 +93,10 @@ readjson(OsProc) when is_record(OsProc, os_proc) -> ?LOG_INFO("OS Process ~p Log :: ~s", [OsProc#os_proc.port, Msg]), readjson(OsProc); [<<"error">>, Id, Reason] -> - throw({list_to_atom(binary_to_list(Id)),Reason}); + throw({couch_util:to_existing_atom(Id),Reason}); [<<"fatal">>, Id, Reason] -> ?LOG_INFO("OS Process ~p Fatal Error :: ~s ~p",[OsProc#os_proc.port, Id, Reason]), - throw({list_to_atom(binary_to_list(Id)),Reason}); + throw({couch_util:to_existing_atom(Id),Reason}); Result -> Result end. -- cgit v1.2.3