}
while (1) {
-#if defined _WINDOWS && _MSC_VER < 1900 /* 1900 == VS2015 has real snprintf */
+#if defined _WINDOWS && !defined __WINE__ && _MSC_VER < 1900 /* 1900 == VS2015 has real snprintf */
#define vsnprintf _vsnprintf
#endif
#ifdef va_copy
if (*datalen < 4)
return NULL;
len = GET_32BIT_MSB_FIRST((const unsigned char *)*data);
- if (*datalen < len+4)
+ if (*datalen - 4 < len)
return NULL;
ret = (void *)((const char *)*data + 4);
*datalen -= len + 4;
char *buildinfo(const char *newline)
{
strbuf *buf = strbuf_new();
+ extern const char commitid[]; /* in commitid.c */
strbuf_catf(buf, "Build platform: %d-bit %s",
(int)(CHAR_BIT * sizeof(void *)),
strbuf_catf(buf, " (_MSC_VER=%d)", (int)_MSC_VER);
#endif
+#ifdef BUILDINFO_GTK
+ {
+ char *gtk_buildinfo = buildinfo_gtk_version();
+ if (gtk_buildinfo) {
+ strbuf_catf(buf, "%sCompiled against GTK version %s",
+ newline, gtk_buildinfo);
+ sfree(gtk_buildinfo);
+ }
+ }
+#endif
+
#ifdef NO_SECURITY
strbuf_catf(buf, "%sBuild option: NO_SECURITY", newline);
#endif
strbuf_catf(buf, "%sBuild option: DEBUG", newline);
#endif
+ strbuf_catf(buf, "%sSource commit: %s", newline, commitid);
+
return strbuf_to_str(buf);
}