Revision: 73031
          http://sourceforge.net/p/brlcad/code/73031
Author:   starseeker
Date:     2019-05-09 11:45:48 +0000 (Thu, 09 May 2019)
Log Message:
-----------
Bail immediately if we try to write out an invalid rev->sha1 map entry

Modified Paths:
--------------
    brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx    2019-05-09 
11:38:32 UTC (rev 73030)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx    2019-05-09 
11:45:48 UTC (rev 73031)
@@ -140,6 +140,13 @@
     std::ofstream outfile("rev_gsha1s.txt", std::ios::out | std::ios::binary);
     if (!outfile.good()) exit(-1);
     for (r_it = rev_to_gsha1.begin(); r_it != rev_to_gsha1.end(); r_it++) {
+       std::string s1 = r_it->first.first;
+       std::string s2 = std::to_string(r_it->first.second);
+       std::string s3 = r_it->second;
+       if (!s1.length() || !s2.length() || !s3.length()) {
+           std::cerr << "Invalid rev sha1 entry: " << r_it->first.first << "," 
<< r_it->first.second << "," << r_it->second << "\n";
+           exit(1);
+       }
        outfile << r_it->first.first << "," << r_it->first.second << "," << 
r_it->second << "\n";
     }
     outfile.close();

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to