Bug 190532. Compute properly length when escaping SecretIDs
This commit is contained in:
parent
dfcdf3988a
commit
47d1509d82
@ -1,3 +1,7 @@
|
||||
--------------------------------------------------------------------
|
||||
Thu Jul 06 12:04:53 MST 2006 - jnorman@novell.com
|
||||
- Bug 190532. Compute properly length when escaping SecretIDs
|
||||
|
||||
--------------------------------------------------------------------
|
||||
Mon Jul 05 12:22:53 MST 2006 - jnorman@novell.com
|
||||
- Bug 176460. Added a filewatcher on file in question
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
|
||||
#include "micasa_types.h"
|
||||
#include "micasa.h"
|
||||
#include "sscs_lldefs.h"
|
||||
@ -173,7 +174,7 @@ static void sscsshs_ChkEscapeString
|
||||
{ /* beginning of the call */
|
||||
/* ########################## DECLARATIONS START HERE ######################### */
|
||||
|
||||
int len = 0, i, k = 0, tmplen = 0, escaped = 0;
|
||||
int len = 0, i, k = 0, tmplen = 0, escaped = 0, escapedAdded = 0;
|
||||
SS_UTF8_T *tempBuf = NULL;
|
||||
|
||||
/* ############################## CODE STARTS HERE ############################ */
|
||||
@ -201,18 +202,21 @@ static void sscsshs_ChkEscapeString
|
||||
tempBuf[k++] = (SS_UTF8_T)'\\';
|
||||
tempBuf[k++] = (SS_UTF8_T)'\\';
|
||||
escaped = 1;
|
||||
escapedAdded++;
|
||||
break;
|
||||
|
||||
case (SS_UTF8_T)':':
|
||||
tempBuf[k++] = (SS_UTF8_T)'\\';
|
||||
tempBuf[k++] = (SS_UTF8_T)':';
|
||||
escaped = 1;
|
||||
escapedAdded++;
|
||||
break;
|
||||
|
||||
case (SS_UTF8_T)'=':
|
||||
tempBuf[k++] = (SS_UTF8_T)'\\';
|
||||
tempBuf[k++] = (SS_UTF8_T)'=';
|
||||
escaped = 1;
|
||||
escapedAdded++;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -225,7 +229,7 @@ static void sscsshs_ChkEscapeString
|
||||
memset(*entryBuf, 0, *entryBufLen);
|
||||
free (*entryBuf);
|
||||
*entryBuf = tempBuf;
|
||||
*entryBufLen = *entryBufLen + k;
|
||||
*entryBufLen = *entryBufLen + escapedAdded;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user