- Timestamp:
- Feb 8, 2013 4:46:44 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r44503 r44590 47 47 #include "Logging.h" 48 48 49 #include <iprt/base64.h> 49 50 #include <iprt/buildconfig.h> 50 51 #include <iprt/ctype.h> … … 2990 2991 } 2991 2992 else if (!strncmp(strCFGMValueUtf8.c_str(), "bytes:", sizeof("bytes:") - 1)) 2992 rc = VERR_NOT_IMPLEMENTED; 2993 { 2994 char const *pszBase64 = strCFGMValueUtf8.c_str() + sizeof("bytes:") - 1; 2995 ssize_t cbValue = RTBase64DecodedSize(pszBase64, NULL); 2996 if (cbValue > 0) 2997 { 2998 void *pvBytes = RTMemTmpAlloc(cbValue); 2999 if (pvBytes) 3000 { 3001 rc = RTBase64Decode(pszBase64, pvBytes, cbValue, NULL, NULL); 3002 if (RT_SUCCESS(rc)) 3003 rc = CFGMR3InsertBytes(pNode, pszCFGMValueName, pvBytes, cbValue); 3004 RTMemTmpFree(pvBytes); 3005 } 3006 else 3007 rc = VERR_NO_TMP_MEMORY; 3008 } 3009 else if (cbValue == 0) 3010 rc = CFGMR3InsertBytes(pNode, pszCFGMValueName, NULL, 0); 3011 else 3012 rc = VERR_INVALID_BASE64_ENCODING; 3013 } 2993 3014 /* auto detect type. */ 2994 3015 else if (RT_SUCCESS(RTStrToUInt64Full(strCFGMValueUtf8.c_str(), 0, &u64Value)))
Note:
See TracChangeset
for help on using the changeset viewer.