- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: urgent, need help about pro*c
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 02:06 AM
тАО07-07-2004 02:06 AM
urgent, need help about pro*c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 03:38 AM
тАО07-07-2004 03:38 AM
Re: urgent, need help about pro*c
I do see one thing that could result in possible errors: your use of snprintf() without a proper format string.
For example,
_passwd.len = snprintf((char *)_passwd.arr,sizeof(_passwd.arr),(char*)passwd);
Now consider what might happen if the passwd were something like: "yu%d4F". Snprintf would interpret the "%d" sequence as an integer format and look on the stack for additional variables. This is DANGEROUS code and all your snprintf should be properly coded by adding a format string.
passwd.len = snprintf((char *)_passwd.arr,sizeof(_passwd.arr),"%s",(char*)passwd);
Your use of snprintf, as opposed to sprintf, was a wise choice to prevent overflows but without a format string your wise choice became less than wise. This may not be your problem at the moment (I still suspect missing environment variables) but it is bad code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:53 AM
тАО07-07-2004 04:53 AM
Re: urgent, need help about pro*c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 04:56 AM
тАО07-07-2004 04:56 AM
Re: urgent, need help about pro*c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:15 AM
тАО07-07-2004 05:15 AM
Re: urgent, need help about pro*c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:40 AM
тАО07-07-2004 05:40 AM
Re: urgent, need help about pro*c
The problem CAN'T be as simple as parent works child fails because, after all, even your parent process is the child of still another process.