On Tuesday, February 28, 2017 at 4:36:18 AM UTC+8, Bram Moolenaar wrote: > shqking wrote: > > > Null value check is needed in channel.c file. > > The vulnerable code is at > > https://github.com/vim/vim/blob/master/src/channel.c#L3311 . > > > > Function channel_first_nl() might return NULL. > > Therefore, we should check whether nl is NULL or not before using it at > > line 3322. > > It's not obvious, but the check is actually inside the while loop above. > It keeps looping until a message was received, and when mode is MODE_NL > it calls channel_first_nl() to check it doesn't return NULL. > The only other exit from the while loop is with "return". > > -- > Now it is such a bizarrely improbable coincidence that anything as > mind-bogglingly useful as the Babel fish could have evolved purely by chance > that some thinkers have chosen to see it as a final and clinching proof of the > NON-existence of God. > The argument goes something like this: 'I refuse to prove that I exist,' says > God, 'for proof denies faith, and without faith I am nothing.' > 'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not > have evolved by chance. It proves you exist, and so therefore, by your own > arguments, you don't. QED.' > 'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a > puff of logic. > 'Oh, that was easy,' says Man, and for an encore goes on to prove that black > is white and gets himself killed on the next pedestrian crossing. > -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org /// > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
ok, i see. Thanks for your reply. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
