□ allocated string printf □ It is function of GNU extensions(No C or POSIX) □ int asprintf(char **strp, const char *fmt, ...) □ It prints the contents of fmt to the strp. As much as the fmt+null's size, a memory is allocated to the strp. Later additionally, memory release is needed. □ When successful, it returns the number of characters printed. When an error occurs, It returns -1. □ Example : This stores the string "This sis infosec" in the buffer char *buffer; asprintf(&buffer, "This is %s", "INFOSEC");
author | tychebe |
---|---|
permlink | asprintf-function |
category | security |
json_metadata | {"tags":["security","linux","asprintf","function","gnu"]} |
created | 2016-09-24 07:59:36 |
last_update | 2016-09-24 07:59:36 |
depth | 0 |
children | 0 |
last_payout | 2016-10-25 07:59:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 511 |
author_reputation | 27,548,928,872 |
root_title | "asprintf function" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,345,124 |
net_rshares | 53,981,556 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tychebe | 0 | 53,981,556 | 100% |