Ver código fonte

Remove snprintf() from start-up path

master
Arun Prakash Jana 4 anos atrás
pai
commit
709e7bd7dd
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: A75979F35C080412
1 arquivos alterados com 4 adições e 1 exclusões
  1. +4
    -1
      src/nnn.c

+ 4
- 1
src/nnn.c Ver arquivo

@@ -7287,7 +7287,10 @@ int main(int argc, char *argv[])
/* Create fifo */
if (g_state.autofifo) {
g_tmpfpath[tmpfplen - 1] = '\0';
snprintf(g_buf, CMD_LEN_MAX, "%s/nnn-fifo.%d", g_tmpfpath, getpid());

size_t r = mkpath(g_tmpfpath, "nnn-fifo.", g_buf);

xstrsncpy(g_buf + r - 1, xitoa(getpid()), PATH_MAX - r);
setenv("NNN_FIFO", g_buf, TRUE);
}



Carregando…
Cancelar
Salvar