import: Don't crash on illegal arguments shorter than 11 chars
commit3a8b9692a4f71d31bbe9bfc06c4580913e706c81
authorAndreas Ericsson <ae@op5.se>
Tue, 23 Mar 2010 09:36:16 +0000 (23 10:36 +0100)
committerAndreas Ericsson <ae@op5.se>
Tue, 23 Mar 2010 09:36:16 +0000 (23 10:36 +0100)
tree2bdfd824c114ad05575056bb547a7c2e997447a7
parenta1dc7db70b71df9cd9753954b998e49ea44eb87c
import: Don't crash on illegal arguments shorter than 11 chars

We do this by checking that the argument length is greater than 10
chars before going backwards from the end of it to match it against
"nagios.cfg".

We also make it possible to use nagios.cfg from the current directory.

Signed-off-by: Andreas Ericsson <ae@op5.se>
import.c