summaryrefslogtreecommitdiff
path: root/src/conf.h
diff options
context:
space:
mode:
authorbrl <brl>2007-08-14 20:20:57 +0000
committerbrl <brl>2007-08-14 20:20:57 +0000
commitdaa5550f2e424a88ba6de7602fab405808a2ef23 (patch)
tree5d6fb3f051af6c1938091e64270a8163be1f0528 /src/conf.h
parent1bea7fa97bbdb1ceeb2696b8982a1e025ef751f4 (diff)
downloadratpoison-daa5550f2e424a88ba6de7602fab405808a2ef23.zip
src/main.c (xvsprintf): limit memory allocation to 200K when vsnprintf return -1.
Diffstat (limited to 'src/conf.h')
-rw-r--r--src/conf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf.h b/src/conf.h
index d0322cc..8a62c20 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -123,4 +123,10 @@
#define DEFAULT_FONT "-*-fixed-bold-r-normal-*-15-*-*-*-c-*-*-*"
#define BACKUP_FONT "*"
+/* maximum xvsprintf result string length for systems with pre-C99 snprintf:
+ * on errors that are either permanent or cannot be distinguished from those
+ * as libc's snprintf might by returning -1 for too small buffers, at most
+ * the double of this value is tried before giving up */
+#define MAX_LEGACY_SNPRINTF_SIZE 102400
+
#endif /* !_ _RATPOISON_CONF_H */