bacula/bacula-7.4.0-seg-fault.patch

22 lines
659 B
Diff
Raw Normal View History

2016-01-25 20:12:28 +00:00
diff -Naur bacula-7.4.0.old/src/lib/message.c bacula-7.4.0/src/lib/message.c
--- bacula-7.4.0.old/src/lib/message.c 2016-01-25 21:00:14.018670291 +0100
+++ bacula-7.4.0/src/lib/message.c 2016-01-25 21:07:08.088325232 +0100
@@ -28,6 +28,7 @@
*
*/
+#include <assert.h>
#include "bacula.h"
#include "jcr.h"
@@ -1329,7 +1330,8 @@
if (type == M_ABORT) {
assert_msg = bstrdup(buf);
char *p = 0;
- p[0] = 0; /* generate segmentation violation */
+ // p[0] = 0; /* generate segmentation violation */
+ assert(p!=NULL);
}
if (type == M_ERROR_TERM) {
exit(1);