> btrfs-list.c:
> case BTRFS_LIST_OTIME:
> if (subv->otime)
> strftime(tstr, 256, "%Y-%m-%d %X",
> localtime(&subv->otime));
> else
> strcpy(tstr, "-");
> printf("%s", tstr);
> break;
>
> localtime() returned NULL then strftime() got SIGSEGV.
>
> The reason is that ri->otime.sec is stored as little endian but
> assigned to 't' without conversion.
That's why localtime() returned null, sure, but it doesn't excuse
strftime() being called with a null *tm! Add some error checking around
localtime(). It should warn that otime is nonsense, not crash.
- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html