That's not a great position to be in. The company you work for can let you go at any moment whether or not you have something lined up, and if that's not something you can tolerate then you might want to start working on it (either by increasing your saving or by reducing the out of time it would take you to find another job).
That's the case with any job, though. There's no such thing as a 'job for life' now. No matter how much one 'works on it', job security is a myth in industry in the 21st century.
When someone says 'job security', the profession I immediately jump to is a tenured professorship. And those don't exactly come by frequently.