Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f201d7bd
Commit
f201d7bd
authored
Nov 17, 2014
by
Mike Hibler
Browse files
Avoid uninitialized variable.
parent
6d22c601
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/create_image.in
View file @
f201d7bd
...
...
@@ -1502,14 +1502,25 @@ sub check_progress($$)
# been exceeded.
#
my
$cursize
=
(
stat
(
$fname
))[
7
];
if
(
$usefup
&&
!
defined
(
$cursize
))
{
if
(
!
defined
(
$cursize
))
{
#
# XXX avoid an ugly race.
# When done, frisuploadd moves foo.tmp -> foo
# If we didn't find foo.tmp, try foo now.
#
$fname
=~
s/\.tmp$//
;
$cursize
=
(
stat
(
$fname
))[
7
];
if
(
$usefup
)
{
$fname
=~
s/\.tmp$//
;
$cursize
=
(
stat
(
$fname
))[
7
];
}
#
# XXX avoid an ugly uninitialized value.
# This should not happen, since we created the file,
# but just in case, if the file doesn't exist set the size to 0.
# We will eventually timeout.
#
if
(
!
defined
(
$cursize
))
{
$cursize
=
0
;
}
}
if
(
$cursize
>
$maximagesize
)
{
$result
=
"
toobig
";
...
...
Write
Preview
Supports
Markdown
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