In 1999, the real Crocodile Dundee had a similar encounter with the law which ended somewhat differently:
Via Herald Sun
Two decades before meeting his drug-fueled death, bushman Rod Ansell became popular in Australia when his boat capsized during a solo hunting expedition and he had to spend two months trapped in the wilderness -- or, more accurately, the wilderness was trapped with him. With limited resources, he survived by drinking cow blood, sleeping with snakes, and occasionally fighting and decapitating the odd crocodile. During a later BBC interview about his adventure (which he reportedly attended barefoot), Ansell mentioned that the hotel they'd put him in was very nice and all, but he'd decided to sleep on the floor. Oddly enough, it was this little detail -- not any of the animal fighting stuff -- that inspired Crocodile Dundee. Hollywood really wanted to make a movie about unconventional sleeping preferences; they just threw some high adventure in there as filler.
Also, Ansell was able to recognize the danger of knives of all sizes.