]>
Commit | Line | Data |
---|---|---|
806fcffa AO |
1 | diff -ruNp xv-3.10a.orig/xvtext.c xv-3.10a/xvtext.c |
2 | --- xv-3.10a.orig/xvtext.c 2012-07-02 14:12:18.729232321 +0200 | |
3 | +++ xv-3.10a/xvtext.c 2012-07-02 14:14:09.245684311 +0200 | |
4 | @@ -53,7 +53,7 @@ | |
5 | # define TV_J_NBUTTS 8 | |
6 | #endif | |
7 | ||
8 | -#define TITLELEN 128 | |
9 | +#define TITLELEN 270 | |
10 | ||
11 | #ifdef TV_MULTILINGUAL | |
12 | struct coding_spec { | |
13 | @@ -385,7 +385,7 @@ int TextView(fname) | |
14 | ||
15 | int filetype; | |
16 | long textlen; | |
17 | - char *text, buf[512], title[128], rfname[MAXPATHLEN+1]; | |
18 | + char *text, buf[512], title[TITLELEN], rfname[MAXPATHLEN+1]; | |
19 | char *basefname[128]; /* just current fname, no path */ | |
20 | FILE *fp; | |
21 | char filename[MAXPATHLEN+1]; | |
22 | @@ -453,7 +453,7 @@ int TextView(fname) | |
23 | ||
24 | fclose(fp); | |
25 | ||
26 | - sprintf(title, "File: '%s'", BaseName(fname)); | |
27 | + snprintf(title, TITLELEN, "File: '%s'", BaseName(fname)); | |
28 | OpenTextView(text, (int) textlen, title, 1); | |
29 | ||
30 | /* note: text gets freed when window gets closed */ | |
31 | @@ -545,7 +545,7 @@ void ChangeCommentText() | |
32 | tv->freeonclose = 0; | |
33 | ||
34 | if (strlen(fullfname)) | |
35 | - sprintf(tv->title, "File: '%s'", BaseName(fullfname)); | |
36 | + snprintf(tv->title, TITLELEN, "File: '%s'", BaseName(fullfname)); | |
37 | else | |
38 | sprintf(tv->title, "<no file loaded>"); | |
39 |