File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1.1.1 1996/07/09 06:21:59 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.2 1996/07/09 06:35:38 scrappy Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -146,8 +146,8 @@ mdunlink(Relation reln)
146
146
int i ;
147
147
MdfdVec * v , * ov ;
148
148
MemoryContext oldcxt ;
149
- char fname [20 ]; /* XXX should have NAMESIZE defined */
150
- char tname [20 ];
149
+ char fname [NAMEDATALEN ];
150
+ char tname [NAMEDATALEN + 10 ]; /* leave room for overflow suffixes*/
151
151
152
152
/* On Windows NT you can't unlink a file if it is open so we have
153
153
** to do this.
@@ -157,8 +157,8 @@ mdunlink(Relation reln)
157
157
#endif /* WIN32 */
158
158
159
159
160
- memset (fname ,0 ,20 );
161
- strncpy (fname , RelationGetRelationName (reln )-> data , 16 );
160
+ memset (fname ,0 , NAMEDATALEN );
161
+ strncpy (fname , RelationGetRelationName (reln )-> data , NAMEDATALEN );
162
162
163
163
if (FileNameUnlink (fname ) < 0 )
164
164
return (SM_FAIL );
You can’t perform that action at this time.
0 commit comments