Hacker News new | ask | show | jobs
by lelanthran 267 days ago
> Yes, it can.

I don't think so. If it could, then this code would reliably crash:

    char *mystr = strdup (oldstr);
    if (mystr)
        *mystr = 0; // Truncate string
That never crashes.
1 comments