What is the max length of names in Blender?
A test suggests that the longest name that an object can have is sixty one characters. I determined this by using the default cube, and giving it the name


  howlongof_anamecant_hiscubeob_jecthavea_nywayaques_tionerasks_a


A material name has the same parameters, leading me to suspect that the same name length is the default for any internal name. 

Although you did not ask it, I believe that the total path name of a Blender file is OS dependent, and in Window 7 Professonal 64 bit, is about 256 characters.