X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frcvtty.c;h=333a3b2fe737dd982b8b68ee6e15a6532e000a87;hp=97c32284b531038d9c20dafac78dc67d1f5d5431;hb=2f689a1cb907a5de04e6d39ffd217a69af3216c7;hpb=352fe458a57061db81240c19fa4b356c7448463b diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 97c3228..333a3b2 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -287,12 +287,12 @@ static int header_fd (void) { int fd; - char *nfs, tmpfil[BUFSIZ]; + char *nfs; + char *tfile = NULL; - strncpy (tmpfil, m_tmpfil (invo_name), sizeof(tmpfil)); - if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK) - return NOTOK; - unlink (tmpfil); + tfile = m_mktemp2(NULL, invo_name, &fd, NULL); + if (tfile == NULL) return NOTOK; + unlink (tfile); rewind (stdin);