michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: michael@0: // Check that we don't crash on reading a directory entry signature michael@0: var ios = Cc["@mozilla.org/network/io-service;1"]. michael@0: getService(Ci.nsIIOService); michael@0: michael@0: function run_test() { michael@0: var file = do_get_file("data/test_bug658093.zip"); michael@0: var spec = "jar:" + ios.newFileURI(file).spec + "!/0000"; michael@0: var channel = ios.newChannel(spec, null, null); michael@0: var failed = false; michael@0: try { michael@0: var stream = channel.open(); michael@0: } catch (e) { michael@0: failed = true; michael@0: } michael@0: do_check_true(failed); michael@0: }