#447 Patch for websim segfault on loading homepage

Unstable
open
WebSim (1)
5
2009-07-18
2009-07-10
Chris
No

I was quicly testing websim today and found that it was segfaulting when I ran it and loaded the homepage. size_t is larger than unsigned int on 64 bit machines (I'm guessing) so this was resuting in this never failing. Patch is below. Also there is no way to log a websim tracker item

Index: src/req_sim.cc

--- src/req_sim.cc (revision 7973)
+++ src/req_sim.cc (working copy)
@@ -59,7 +59,7 @@
response = WebSim::webpage;

// replacing 'HOST' by actual 'host:port' term
- unsigned int i=0;
+ size_t i=0;
i = response.find("HOST");
while(i!=std::string::npos){

Discussion

  • thanks for the first bug report and patch for WebSim. I've added a websim category, which auto-assigns to me. I'll apply the patch, then come back and close this bug.

     
    • labels: 389124 --> 1187660
    • assigned_to: gerkey --> rtv
     
  • Toby Collett
    Toby Collett
    2009-07-16

    • labels: 1187660 -->
     
    • labels: --> WebSim
    • milestone: --> Unstable
     
  • The changes have been made in SVN trunk.
    Thank you for your contribution.

     
  • thanks for the fix.