You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/06/11 00:56:27 UTC
svn commit: r666370 - /incubator/thrift/trunk/compiler/cpp/src/main.cc
Author: dreiss
Date: Tue Jun 10 15:56:26 2008
New Revision: 666370
URL: http://svn.apache.org/viewvc?rev=666370&view=rev
Log:
Print an error instead of segfaulting with a bad compiler command line.
Modified:
incubator/thrift/trunk/compiler/cpp/src/main.cc
Modified: incubator/thrift/trunk/compiler/cpp/src/main.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/main.cc?rev=666370&r1=666369&r2=666370&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/main.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/main.cc Tue Jun 10 15:56:26 2008
@@ -1112,6 +1112,10 @@
// Real-pathify it
char rp[PATH_MAX];
+ if (argv[i] == NULL) {
+ fprintf(stderr, "!!! Missing file name\n");
+ usage();
+ }
if (saferealpath(argv[i], rp) == NULL) {
failure("Could not open input file with realpath: %s", argv[i]);
}