Commit 8b49ccac authored by unknown's avatar unknown
Browse files

Bug#10193

Invalid DataDir in config causes ndbd segfault


ndb/src/kernel/error/ErrorReporter.cpp:
  print error and return error if unable to open the file for error reporting.
parent c758512a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
    // Create a new file, and skip the first 69 bytes, 
    // which are info about the current offset
    stream = fopen(theErrorFileName, "w");
    if(stream == NULL)
    {
      fprintf(stderr,"Unable to open error log file: %s\n", theErrorFileName);
      return -1;
    }
    fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69,
	    "                        \n\n\n");