Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 1997 09:45:42 -0800 (PST)
From:      jrj@purdue.edu
To:        freebsd-gnats-submit@freebsd.org
Subject:   bin/2779: Uninitialized variable may cause "fetch -m" to fail
Message-ID:  <199702201745.JAA25998@freefall.freebsd.org>
Resent-Message-ID: <199702201750.JAA26125@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2779
>Category:       bin
>Synopsis:       Uninitialized variable may cause "fetch -m" to fail
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 20 09:50:01 PST 1997
>Last-Modified:
>Originator:     John R. Jackson
>Organization:
Purdue University Computing Center
>Release:        FreeBSD-current as of 18-Jan-97
>Environment:
Paragon OSF/1 galaxy 1.0.4 R1.4.1+031714 paragon
(specially ported version of "fetch")
>Description:
Near line 400 of fetch/main.c, it is possible for "seekloc" to not be
initialized if mirror mode is used and the file does not exist, i.e.
size0 != size or modtime != t.  This causes the ftpGet to do random
things depending on what was on the stack, such as retrieving nothing,
getting only part of the file, etc.
>How-To-Repeat:
Create a version of fetch with initializes seekloc to a "large"
value, then try a mirror mode retrieve of a file that is not local.
You should end up with a zero length file.
>Fix:
I have a suggested patch that I will send via E-mail as a followup,
although it is fairly obvious how to fix this.


>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702201745.JAA25998>