• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1212
  • Last Modified:

How do I convert Blob to Char

How do I  convert Blob to Char in C
1 Solution
assuming the blob is already in a buffer (normally unsigned char). if the blob actually contains text you simply can cast the buffer and add terminating zero char.

   char * p;
   p = (char *)buffer;
   p[length_of_blob_in_bytes] = '\0';

note you need at least one extra byte for buffer to do so.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

We Need Your Input!

WatchGuard is currently running a beta program for our new macOS Host Sensor for our Threat Detection and Response service. We're looking for more macOS users to help provide insight and feedback to help us make the product even better. Please sign up for our beta program today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now