File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.11 1998/02/26 04:37:13 momjian Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.12 1998/05/29 13:31:52 thomas Exp $
15
15
*
16
16
*-------------------------------------------------------------------------
17
17
*/
@@ -36,12 +36,19 @@ NameData *
36
36
namein (char * s )
37
37
{
38
38
NameData * result ;
39
+ int len ;
39
40
40
41
if (s == NULL )
41
42
return (NULL );
42
43
result = (NameData * ) palloc (NAMEDATALEN );
43
44
/* always keep it null-padded */
44
45
StrNCpy (result -> data , s , NAMEDATALEN );
46
+ len = strlen (result -> data );
47
+ while (len < NAMEDATALEN )
48
+ {
49
+ * (result -> data + len ) = '\0' ;
50
+ len ++ ;
51
+ }
45
52
return (result );
46
53
}
47
54
You can’t perform that action at this time.
0 commit comments