*/
#include "includes.h"
-#include "pstring.h"
/*
this is a tiny msrpc packet generator. I am only using this to
uint16_t len1, len2;
uint32_t ptr;
uint32_t *v;
- pstring p;
+ char *p;
va_start(ap, format);
for (i=0; format[i]; i++) {
return False;
if (0 < len1) {
- pull_string(p, blob->data + ptr, sizeof(p),
- len1,
- STR_UNICODE|STR_NOALIGN);
- (*ps) = talloc_strdup(mem_ctx, p);
- if (!(*ps)) {
+ if (convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX, blob->data + ptr, len1, (void **)&p) < 0) {
return False;
}
+ (*ps) = p;
} else {
(*ps) = "";
}