tmps_base = tmps_max; /* protect our mortal string */
About this quote
- What does it mean?
- The code copies the maximum temporary string size to a base variable, humorously protecting the string.
- In plain terms
- It saves the max size to keep the string safe.
- What can you take from it?
- Preserve original limits before modifying them.
Where it applies
Putting it to work
Questions to consider
- What risks does this protect against?
- Is the naming clear enough?
Another view
The comment is vague; actual protection may be insufficient.
More from Larry Wall
str->str_pok |= SP_FBM; /* deep magic */ s = (unsigned char*)(str->str_ptr); /* deeper magic */
Permalink to quote #246 /* And you'll never guess what the dog had */ /* in its mouth... */
Permalink to quote #241 echo 'Hmmm...you don't have Berkeley networking in libc.a...' echo 'but the Wollongong group seems to have hacked it in.
Permalink to quote #248
Related quotes
But the possibility of abuse may be a good reason for leaving capabilities out of other computer languages, it's not a good reason for leaving capabilities out…
Larry WallLarry Wall quote #122 Well, you can implement a Perl peek() with unpack('P',...). Once you have that, there's only security through obscurity. :-)
Larry WallLarry Wall quote #140 Russia does not have in its possession any trustworthy data that supports the existence of nuclear weapons or any weapons of mass destruction in Iraq and we ha…
Vladimir PutinVladimir Putin quote #1