Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
5587276b
Commit
5587276b
authored
Nov 20, 2014
by
Uwe Schulzweida
Browse files
table::decodeForm1: missing longname results in Abort trap (bug fix)
parent
c922275c
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
5587276b
2014-11-20 Uwe Schulzweida
* table::decodeForm1: missing longname results in Abort trap (bug fix)
2014-11-14 Uwe Schulzweida
* cdfCopyRecord: removed limit for datasize
...
...
src/table.c
View file @
5587276b
...
...
@@ -205,16 +205,21 @@ decodeForm1(char *pline, char *name, char *longname, char *units)
while
(
isspace
((
int
)
*
pline
)
)
pline
++
;
len
=
strlen
(
pline
);
if
(
len
>
0
)
if
(
len
>
0
)
{
pstart
=
pline
;
pend
=
strrchr
(
pline
,
'['
);
if
(
pend
)
pend
--
;
if
(
pend
==
pstart
)
len
=
0
;
else
pend
=
pstart
+
len
;
while
(
isspace
((
int
)
*
pend
)
)
pend
--
;
len
=
(
size_t
)(
pend
-
pstart
+
1
);
{
if
(
pend
)
pend
--
;
else
pend
=
pstart
+
len
;
while
(
isspace
((
int
)
*
pend
)
)
pend
--
;
len
=
(
size_t
)(
pend
-
pstart
+
1
);
}
if
(
len
>
0
)
{
memcpy
(
longname
,
pstart
,
len
);
...
...
@@ -234,10 +239,10 @@ decodeForm1(char *pline, char *name, char *longname, char *units)
{
memcpy
(
units
,
pstart
,
len
);
units
[
len
]
=
0
;
}
}
}
}
return
(
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment