Source/JavaScriptCore/ChangeLog

 12017-07-14 Michael Catanzaro <mcatanzaro@igalia.com>
 2
 3 -Wformat-truncation warning in ConfigFile.cpp
 4 https://bugs.webkit.org/show_bug.cgi?id=174506
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Check if the JSC config filename would be truncated due to exceeding max path length. If so,
 9 return ParseError.
 10
 11 * runtime/ConfigFile.cpp:
 12 (JSC::ConfigFile::parse):
 13
1142017-07-14 Yusuke Suzuki <utatane.tea@gmail.com>
215
316 [WTF] Use std::unique_ptr for StackTrace

Source/JavaScriptCore/runtime/ConfigFile.cpp

@@void ConfigFile::parse()
282282 char* filename = nullptr;
283283 if (scanner.tryConsume('=') && (filename = scanner.tryConsumeString())) {
284284 if (statementNesting != NestedStatementFailedCriteria) {
285  if (filename[0] != '/')
286  snprintf(logPathname, s_maxPathLength + 1, "%s/%s", m_configDirectory, filename);
287  else
 285 if (filename[0] != '/') {
 286 int written = snprintf(logPathname, s_maxPathLength + 1, "%s/%s", m_configDirectory, filename);
 287 // Filename truncated?
 288 if (written < 0 || static_cast<unsigned>(written) >= s_maxPathLength + 1)
 289 return ParseError;
 290 } else
288291 strncpy(logPathname, filename, s_maxPathLength);
289292 }
290293