/[gentoo-x86]/sci-chemistry/molden/files/molden-4.8-overflow.patch
Gentoo

Contents of /sci-chemistry/molden/files/molden-4.8-overflow.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sat Jun 23 11:21:23 2012 UTC (4 years, 5 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +30 -4 lines
sci-chemistry/molden: Fix buffer overflow, #342907; Version Bump, #355741; Fix build failures, #358917, #423015; drop old

(Portage version: 2.2.0_alpha111/cvs/Linux x86_64)

1 jlec 1.2 xwin.c | 10 ++++++----
2     1 files changed, 6 insertions(+), 4 deletions(-)
3    
4     diff --git a/xwin.c b/xwin.c
5     index f395909..092edff 100644
6     --- a/xwin.c
7     +++ b/xwin.c
8     @@ -13552,7 +13552,7 @@ void NewActiveStruct()
9     #ifdef CRAY
10     _fcd ztr;
11     #else
12     - char ztr;
13     + char ztr[4];
14     #endif
15     #endif
16    
17     @@ -13650,8 +13650,10 @@ void NewActiveStruct()
18     */
19     clfpstr->ihashz = 0;
20     #else
21     - strncpy(&ztr,HetAtm[j],3);
22     - parhet_(&j1,&ztr);
23     + if (HetAtm[j] != NULL) {
24     + strncpy(ztr,HetAtm[j],3);
25     + parhet_(&j1,ztr);
26     + }
27     #endif
28     #endif
29     }
30     @@ -27353,7 +27355,7 @@ char *errstr;
31 markusle 1.1 UpdateZME();
32     RedrawScroll(&zscroll);
33     }
34     - strcpy(ZMEerr,errstr);
35     + strncpy(ZMEerr,errstr,MAXZMEERR);
36     RedrawStatus();
37     }
38    

  ViewVC Help
Powered by ViewVC 1.1.20