def METHOD_NAME(datagram_small):
    """This tests DatagramInputFile's handling of a corrupt size header."""
    dg, verify = datagram_small
    file = tempfile.NamedTemporaryFile(suffix='.bin')
    filename = core.Filename.from_os_specific(file.name)
    filename.make_true_case()
    dof = core.DatagramOutputFile()
    dof.open(filename)
    dof.put_datagram(dg)
    dof.close()
    # Corrupt the size header to 1GB
    file.seek(0)
    file.write(b'\xFF\xFF\xFF\x4F')
    file.flush()
    dg2 = core.Datagram()
    dif = core.DatagramInputFile()
    dif.open(filename)
    assert not dif.get_datagram(dg2)
    dif.close()
    # Truncate the file
    for size in [12, 8, 4, 3, 2, 1, 0]:
        file.truncate(size)
        dg2 = core.Datagram()
        dif = core.DatagramInputFile()
        dif.open(filename)
        assert not dif.get_datagram(dg2)
        dif.close()
    # Should we test that dg2 is unmodified?