I've not seen the movie, but I've heard that the ending had nothing to do with the book.
The story isn't bad. Good summer afternoon read...sex, monsters, and a plot that doesn't bog you down with a lot of details.
It was a pretty entertaining movie until the ending.
I can’t emphasize how utterly miserable (and moronic) that ending was. It was basically Frank Darabont giving the finger to anyone who bothered to sit through his movie. I don’t think an ending could be any worse than the ending of “The Mist”.