---
title: "tmps_base = tmps_max; /* protect our mortal string */ — Larry Wall Quote #244 | QuotesBy.net"
description: "tmps_base = tmps_max; /* protect our mortal string */ — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # tmps\_base = tmps\_max; /\* protect our mortal string \*/

[Larry Wall](https://quotesby.net/Larry-Wall)\#244

[Perl](https://quotesby.net/Larry-Wall/perl/)[Maintenance](https://quotesby.net/Larry-Wall/maintenance/)[Security](https://quotesby.net/Larry-Wall/security/)[Code comment](https://quotesby.net/Larry-Wall/code-comment/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9Ctmps_base%20%3D%20tmps_max%3B%20%2F%2A%20protect%20our%20mortal%20string%20%2A%2F%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F244%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9Ctmps_base%20%3D%20tmps_max%3B%20%2F%2A%20protect%20our%20mortal%20string%20%2A%2F%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F244%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F244%2F)

## 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 termsIt saves the max size to keep the string safe.What can you take from it?Preserve original limits before modifying them.

### Where it applies

- buffer overflow prevention
- legacy code maintenance

### Putting it to work

- store limits before changes
- add protective checks

### 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

1. > str-&gt;str\_pok \|= SP\_FBM; /\* deep magic \*/ s = (unsigned char\*)(str-&gt;str\_ptr); /\* deeper magic \*/

[Permalink to quote \#246](https://quotesby.net/Larry-Wall/246/ "Permalink to quote 246")
2. > /\* And you'll never guess what the dog had \*/ /\* in its mouth... \*/

[Permalink to quote \#241](https://quotesby.net/Larry-Wall/241/ "Permalink to quote 241")
3. > 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](https://quotesby.net/Larry-Wall/248/ "Permalink to quote 248")

## Related quotes

1. > 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 Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#122](https://quotesby.net/Larry-Wall/122/ "Permalink to quote 122")
2. > Well, you can implement a Perl peek() with unpack('P',...). Once you have that, there's only security through obscurity. :-)

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#140](https://quotesby.net/Larry-Wall/140/ "Permalink to quote 140")
3. > 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 Putin](https://quotesby.net/Vladimir-Putin)[Vladimir Putin quote \#1](https://quotesby.net/Vladimir-Putin/1/ "Permalink to quote 1")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "tmps_base = tmps_max; /* protect our mortal string */",
    "url": "https://quotesby.net/Larry-Wall/244/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #244",
            "item": "https://quotesby.net/Larry-Wall/244/"
        }
    ]
}
```
