summaryrefslogtreecommitdiff
path: root/pico/fileio.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-05-31 17:08:22 -0600
committerEduardo Chappa <chappa@washington.edu>2013-05-31 17:08:22 -0600
commit81e994d7907f850506ddc248f84761a54995e58c (patch)
tree3bc4993b48ddeec45dee51323437200ab975887c /pico/fileio.c
parent077522d7e058133f9de99d0d74481566b21c5a98 (diff)
downloadalpine-81e994d7907f850506ddc248f84761a54995e58c.tar.xz
* Fix not allow remote execution by adding PIPE_NOSHELL to the opening of a url by
a browser.
Diffstat (limited to 'pico/fileio.c')
-rw-r--r--pico/fileio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pico/fileio.c b/pico/fileio.c
index 5cf124c0..2b598e0c 100644
--- a/pico/fileio.c
+++ b/pico/fileio.c
@@ -95,6 +95,7 @@ ffgetline(UCS buf[], size_t nbuf, size_t *charsreturned, int msg)
{
size_t i;
UCS ucs;
+ static int shown = 0;
if(charsreturned)
*charsreturned = 0;
@@ -121,8 +122,10 @@ ffgetline(UCS buf[], size_t nbuf, size_t *charsreturned, int msg)
if(charsreturned)
*charsreturned = nbuf - 1;
- if(msg)
+ if(msg && !shown){
+ shown = 1;
emlwrite("File has long line", NULL);
+ }
return FIOLNG;
}
@@ -131,6 +134,7 @@ ffgetline(UCS buf[], size_t nbuf, size_t *charsreturned, int msg)
}
if(ucs == CCONV_EOF){
+ shown = 0; /* warn the next time, again, only once */
if(ferror(g_pico_fio.fp)){
emlwrite("File read error", NULL);
if(charsreturned)