Bug 80765
| Summary: | broken source code | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | d.binderman |
| Component: | pilot-link | Assignee: | Than Ngo <than> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-06-30 10:56:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
it's not a bug. >it's not a bug.
You seem to be new to C programming.
Have a look at page 22 of Kernighan & Ritchie Second edition.
It's a bug. I think so, the C compiler thinks so.
Oh, i have closed the wrong bug here, cut and paste problem :-( Of course it's a bug, which should be fixed. Thanks your info again. it's fixed in pilot-link-0.11.8-6. Thanks for your report. |
From Bugzilla Helper: User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk (Win98; I) Description of problem: Hello there, I have just tried to compile pilot-link-0.11.3-3 from Redhat 8.0 Here are some of the messages the compiler produces cc: Info: pilot-datebook-data.c, line 1263: In this statement, an array is being accessed outside the bounds specified for the array type. (subscrbounds) cc: Info: pilot-datebook-windat.c, line 1152: In this statement, an array is being accessed outside the bounds specified for the array type. (subscrbounds) Here is an untested patch to shut up the compiler. ./src/pilot-datebook/pilot-datebook-data.c.old ./src/pilot-datebook/pilot-datebook-data.c *** ./src/pilot-datebook/pilot-datebook-data.c.old Tue Dec 24 20:32:22 2002 --- ./src/pilot-datebook/pilot-datebook-data.c Tue Dec 24 20:33:43 2002 *************** *** 1259,1266 **** buffer[value_end - value_start] = '\0'; } else { ! text_unquote(value_start, buffer, sizeof(buffer)); ! buffer[sizeof(buffer)] = '\0'; } value->type = DATEBOOK_FIELD_STR; value->literal.lit_str = strdup(buffer); --- 1259,1266 ---- buffer[value_end - value_start] = '\0'; } else { ! text_unquote(value_start, buffer, sizeof(buffer) - 1); ! buffer[sizeof(buffer) - 1] = '\0'; } value->type = DATEBOOK_FIELD_STR; value->literal.lit_str = strdup(buffer); ./src/pilot-datebook/pilot-datebook-windat.c.old ./src/pilot-datebook/pilot-datebook-windat.c *** ./src/pilot-datebook/pilot-datebook-windat.c.old Tue Dec 24 20:34:08 2002 --- ./src/pilot-datebook/pilot-datebook-windat.c Tue Dec 24 20:35:56 2002 *************** *** 1149,1155 **** "Unfiled", sizeof(header->aai.category.name) - 1); header->aai.category. ! name[0][sizeof(header->aai.category.name) - 1] = '\0'; header->aai.category.ID[0] = 0; --- 1149,1155 ---- "Unfiled", sizeof(header->aai.category.name) - 1); header->aai.category. ! name[0][sizeof(header->aai.category.name[ 0]) - 1] = '\0'; header->aai.category.ID[0] = 0; Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. compile with any C compiler that checks array indices at compile time, for example compaq. 2. 3. Additional info: