summaryrefslogtreecommitdiff
path: root/pico
diff options
context:
space:
mode:
Diffstat (limited to 'pico')
-rw-r--r--pico/attach.c6
-rw-r--r--pico/browse.c2
-rw-r--r--pico/file.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/pico/attach.c b/pico/attach.c
index be4a9fbf..3a702729 100644
--- a/pico/attach.c
+++ b/pico/attach.c
@@ -170,7 +170,7 @@ AskAttach(char *cmnt, size_t cmntlen, LMLIST **lm)
? "."
: ((gmode & MDTREE) || opertree[0])
? opertree : gethomedir(NULL),
- C_FILESEP, p - fn, fn);
+ C_FILESEP, (int) (p - fn), fn);
}
else{
fname = fn;
@@ -1069,8 +1069,8 @@ process_tag: /* enclosed in [] */
* whole attachment, comment or done!
*/
if(c == ',' || c == '\0' || c == '\"'){
- strncpy(sz, (lblsz) ? lblsz : prettysz(attsz), sizeof(sz));
- sz[sizeof(sz)-1] = '\0';
+ strncpy(sz, (lblsz) ? lblsz : prettysz(attsz), szlen);
+ sz[szlen-1] = '\0';
snprintf(ctmp, sizeof(ctmp), " (%s) %s", sz, (c == '\"') ? "" : "\"\"");
u = utf8_to_ucs4_cpystr(ctmp);
diff --git a/pico/browse.c b/pico/browse.c
index 79940109..11d3eb3f 100644
--- a/pico/browse.c
+++ b/pico/browse.c
@@ -1482,7 +1482,7 @@ FileBrowse(char *dir, size_t dirlen, char *fn, size_t fnlen,
tmp[sizeof(tmp)-1] = '\0';
}
- strncat(tmp, gmp->current->fname, sizeof(tmp)-strlen(tmp));
+ strncat(tmp, gmp->current->fname, sizeof(tmp)-strlen(tmp)-1);
tmp[sizeof(tmp)-1] = '\0';
}
diff --git a/pico/file.c b/pico/file.c
index 405d2c6f..29f16804 100644
--- a/pico/file.c
+++ b/pico/file.c
@@ -408,7 +408,7 @@ file_split(char *dirbuf, size_t dirbuflen, char *orig_fname, int is_for_browse)
? opertree
: ((is_for_browse && browse_dir[0])
? browse_dir : gethomedir(NULL)),
- C_FILESEP, p - orig_fname, orig_fname);
+ C_FILESEP, (int) (p - orig_fname), orig_fname);
}
else{
fn = orig_fname;
@@ -645,7 +645,7 @@ filewrite(int f, int n)
? "."
: ((gmode & MDTREE) || opertree[0])
? opertree : gethomedir(NULL),
- C_FILESEP, p - fname, fname);
+ C_FILESEP, (int) (p - fname), fname);
}
else{
fn = fname;