rpc_G_PL2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



LICENSE: X11

CHANGELOG:

* dlls/rpcrt4/ndr_marshall.c: Greg Turner <gmturner007@ameritech.net>
- distinguish between actual paranoia and meaningful buffer space
- no need to #undef BUFFER_PARANOIA here

-- 
gmt

"The purpose of government is to rein in the rights of the people"
 --President Bill Clinton, MTV interview, 1993
diff -ur -x CVS -x 'bigdif*' ../wine.test/dlls/rpcrt4/ndr_marshall.c ./dlls/rpcrt4/ndr_marshall.c
--- ../wine.test/dlls/rpcrt4/ndr_marshall.c	2002-10-26 13:34:36.000000000 -0500
+++ ./dlls/rpcrt4/ndr_marshall.c	2002-10-26 13:58:38.000000000 -0500
@@ -40,7 +40,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
-#define BUFFER_PARANOIA 40
+#define BUFFER_PARANOIA 20
 
 #if defined(__i386__)
   #define LITTLE_ENDIAN_32_WRITE(pchar, word32) \
@@ -105,7 +105,8 @@
   TRACE("(pStubMsg == ^%p, pMemory == ^%p, pFormat == ^%p)\n", pStubMsg, pMemory, pFormat);
 
   if (*pFormat == RPC_FC_C_CSTRING) {
-    pStubMsg->BufferLength = strlen(pMemory) + BUFFER_PARANOIA;
+    /* we need 12 chars for the [maxlen, offset, len] DWORDS, + 1 byte for '\0' */
+    pStubMsg->BufferLength = strlen(pMemory) + 13 + BUFFER_PARANOIA;
   } else {
     ERR("Unhandled string type: %#x\n", *pFormat); 
     /* FIXME what to do here? */
@@ -147,6 +148,3 @@
 {
   FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.\n", pStubMsg, pFormat, NumberParams);
 }
-
-
-#undef BUFFER_PARANOIA

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux