Hello,
I’m storing encrypted passwords in the sqlite database. The encryption 
algorithm generates “null” character, and therefore the password strings can 
have nulls in them.


 1.  Is this an issue for storing in database ? If strcpy is used anywhere, it 
would be a problem
 2.  I’m using sprintf to generate the SQL statement as shown below. This 
causes a problem because sprintf stops printing when it encounters “null”.

Please advice.

sprintf(SqlStr, "INSERT INTO %s (AttrName, AttrEnum, AttrType, AttrValue, 
ReadWrite, Entity_id) VALUES('%s', %d, %d, '%s', %d, %d);", tbl_name, 
db[i]->attr_name, db[i]->attr_num, db[i]->attr_type, db[i]->attr_value, 
db[i]->attr_src, entity_id);

Thanks,
Kavita
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to