MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / StringListAdd

Function StringListAdd

r77api/clist.c:131–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 FREE(list);
130}
131VOID StringListAdd(PSTRING_LIST list, LPCWSTR value)
132{
133 if (value)
134 {
135 if (list->Count == list->Capacity)
136 {
137 list->Capacity += 16;
138 LPWSTR *newValues = NEW_ARRAY(LPWSTR, list->Capacity);
139 i_memcpy(newValues, list->Values, list->Count * sizeof(LPWSTR));
140
141 LPWSTR *oldValues = list->Values;
142 list->Values = newValues;
143 FREE(oldValues);
144 }
145
146 list->Values[list->Count] = NEW_ARRAY(WCHAR, lstrlenW(value) + 1);
147 StrCpyW(list->Values[list->Count++], value);
148 }
149}
150BOOL StringListContains(PSTRING_LIST list, LPCWSTR value)
151{
152 if (value)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected