- if (temp == 0) {
- if ((home = getenv("HOME")) != 0
- && my_length <= PATH_MAX) {
- temp = typeMalloc(char, my_length);
- if (temp == 0)
- _nc_err_abort(MSG_NO_MEMORY);
- (void) sprintf(temp, PRIVATE_INFO, home);
+ if (MyBuffer == 0) {
+ if ((home = getenv("HOME")) != 0) {
+ size_t want = (strlen(home) + sizeof(PRIVATE_INFO));
+ TYPE_MALLOC(char, want, MyBuffer);
+ _nc_SPRINTF(MyBuffer, _nc_SLIMIT(want) PRIVATE_INFO, home);