gchar *tstamp = NULL;
char *escapedCmd = NULL;
char *escapedVersion = NULL;
- GSList *appList;
+ GSList *appList = NULL;
GSList *appNode;
static Atomic_uint64 updateCounter = {0};
uint64 counter = (uint64) Atomic_ReadInc64(&updateCounter) + 1;
tstamp = VMTools_GetTimeAsString();
-
len = Str_Snprintf(tmpBuf, sizeof tmpBuf, headerFmt,
APP_INFO_VERSION_1,
counter,
tstamp != NULL ? tstamp : "");
+ if (len < 0) {
+ g_warning("Insufficient space for the header.\n");
+ goto abort;
+ }
+
DynBuf_Append(&dynBuffer, tmpBuf, len);
appList = AppInfo_SortAppList(AppInfo_GetAppList());