Author: tretiakov
Date: Wed Jun 21 15:25:22 2006
New Revision: 22451
URL: http://svn.reactos.ru/svn/reactos?rev=22451&view=rev
Log:
Fix potential buffer overflow and unchecked return (bug 1527).
Update headers.
Modified:
trunk/reactos/base/services/rpcss/endpoint.c
trunk/reactos/base/services/rpcss/rpcss.c
Modified: trunk/reactos/base/services/rpcss/endpoint.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/services/rpcss/endpoin…
==============================================================================
--- trunk/reactos/base/services/rpcss/endpoint.c (original)
+++ trunk/reactos/base/services/rpcss/endpoint.c Wed Jun 21 15:25:22 2006
@@ -1,28 +1,9 @@
-/*
- * ReactOS kernel
- * Copyright (C) 2002 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: services/rpcss/endpoint.c
- * PURPOSE: RPC server
- * PROGRAMMER: Eric Kohl
+/*
+ * PROJECT: ReactOS RpcSs service
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: services/rpcss/rpcss.c
+ * PURPOSE: Endpoint mapper
+ * COPYRIGHT: Copyright 2002 Eric Kohl
*/
/* INCLUDES *****************************************************************/
Modified: trunk/reactos/base/services/rpcss/rpcss.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/services/rpcss/rpcss.c…
==============================================================================
--- trunk/reactos/base/services/rpcss/rpcss.c (original)
+++ trunk/reactos/base/services/rpcss/rpcss.c Wed Jun 21 15:25:22 2006
@@ -1,28 +1,9 @@
-/*
- * ReactOS kernel
- * Copyright (C) 2002 ReactOS Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+/*
+ * PROJECT: ReactOS RpcSs service
+ * LICENSE: GPL - See COPYING in the top level directory
* FILE: services/rpcss/rpcss.c
- * PURPOSE: RPC server
- * PROGRAMMER: Eric Kohl
+ * PURPOSE: Service initialization
+ * COPYRIGHT: Copyright 2002 Eric Kohl
*/
/* INCLUDES *****************************************************************/
@@ -40,33 +21,16 @@
/* FUNCTIONS *****************************************************************/
-void
-PrintString(char* fmt,...)
-{
- char buffer[512];
- va_list ap;
-
- va_start(ap, fmt);
- vsprintf(buffer, fmt, ap);
- va_end(ap);
-
- OutputDebugStringA(buffer);
-}
-
-
VOID CALLBACK
ServiceMain(DWORD argc, LPTSTR *argv)
{
- PrintString("ServiceMain() called\n");
-
+ DPRINT("ServiceMain() called\n");
StartEndpointMapper();
-
- PrintString("ServiceMain() done\n");
-
+ DPRINT("ServiceMain() done\n");
}
@@ -78,26 +42,17 @@
HANDLE hEvent;
- PrintString("RpcSs service\n");
-
-
-
+ DPRINT("RpcSs service\n");
#if 0
StartServiceCtrlDispatcher(ServiceTable);
#endif
-
ServiceMain(0, NULL);
+ DPRINT("RpcSS: done\n");
- hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- WaitForSingleObject(hEvent, INFINITE);
-
- PrintString("EventLog: done\n");
-
- ExitThread(0);
- return(0);
+ return 0;
}
/* EOF */